• Web Development - WAYWO - #9
    4,377 replies, posted
[QUOTE=nuttyboffin;47417858]if for example, I did Science.Science it would come up as premium... but if I did sscience.science I found science.science came up as a non premium one under it or something... [img]http://i.imgur.com/vUmDRU7.png[/img] [img]http://i.imgur.com/6jJDjxf.png[/img][/QUOTE] [QUOTE=Rocket;47331658]If you want, you can get yourself [url=http://register.science/]a free .science[/url] domain. All the cool ones are taken already.[/QUOTE] [img]http://i.imgur.com/WlPjcYw.png[/img]
Tried to register for.science using that method; [quote]for.science Domain for.science already registered[/quote] It's parked or something weird
[url]http://www.bunsen-burner.science/[/url]
On a serious note, been working on a news aggregation portal for my town. [url]http://www.grimsby.space/[/url] Powered by AngularJS for the front-end and a Heroku-hosted Sinatra backend.
[QUOTE=benbb;47450032]On a serious note, been working on a news aggregation portal for my town. [url]http://www.grimsby.space/[/url] Powered by AngularJS for the front-end and a Heroku-hosted Sinatra backend.[/QUOTE] Funny, I've been in Grimsby quite a lot (as a foreigner) in the last 2 years. Also, stop post: [img]http://i.imgur.com/EZTkh7D.png[/img]
I've been working on this for the past two days, it's currently static just to make sure that everything is functioning correctly in terms of layout and design. Both the desktop and mobile design are done. Next step, make it actually functional with PHP. [url]http://doubleclick.science/[/url]
So I'm kind of new to php. Now I wanna test my skills and do stuff so I will improve. Now I don't know what to create. So what should I do? Everything that comes to my mind has stuff to do with mysqli and I think that mysqli is a bit too advance for me.
Released [URL="http://babeljs.io/blog/2015/03/31/5.0.0/"]v5.0.0[/URL] of my thing. Also got a fancy [URL="http://babeljs.io/users/"]users[/URL] page that I love to show off.
[QUOTE=Carlton Dance;47453666]So I'm kind of new to php. Now I wanna test my skills and do stuff so I will improve. Now I don't know what to create. So what should I do? Everything that comes to my mind has stuff to do with mysqli and I think that mysqli is a bit too advance for me.[/QUOTE] Use a framework like [URL="http://www.codeigniter.com/"]http://www.codeigniter.com/[/URL]. It gets rid of the original hurdle of php development and allows you to stay organized while slowly getting to the nitty gritty of PHP.
CodeIgniter, Laravel, and CakePHP are all pretty solid when it comes to PHP programming
Need a bit of help. I have an accordion menu, and its using jquery to open it. However it's acting a bit funny. When I click on an item for the first time it doesn't register, I have to click on it a second time to make the menu open. And when it does open, it looks like it opens twice instead of once, looks weird. Any idea what could cause this? EDIT Here is the jQuery [CODE]function toggle() { $('.toggle').click(function(e) { e.preventDefault(); var $this = $(this); if ($this.next().hasClass('show')) { $this.next().removeClass('show'); $this.next().slideUp(350); } else { $this.parent().parent().find('li .inner').removeClass('show'); $this.parent().parent().find('li .inner').slideUp(350); $this.next().toggleClass('show'); $this.next().slideToggle(350); } }); }[/CODE] And my HTML [CODE] <ul class="accordion"> <li> <a class="toggle" href="javascript:toggle();">General Purpose</a> <ul class="inner"> <li><a href = "#">Coveralls</a></li> <li><a href = "#">Coats</a></li> <li><a href = "#">Jackets</a></li> <li><a href = "#">Trousers</a></li> <li><a href = "#">Shirts</a></li> <li><a href = "#">Polshirts</a></li> </ul> </li> <li> <a class="toggle" href="javascript:toggle();">Specialist Purpose (High Visibility)</a> <ul class="inner"> <li>Flame Retardent Coverall</li>[/CODE]
[QUOTE=Over-Run;47455624]Need a bit of help. I have an accordion menu, and its using jquery to open it. However it's acting a bit funny. When I click on an item for the first time it doesn't register, I have to click on it a second time to make the menu open. And when it does open, it looks like it opens twice instead of once, looks weird. Any idea what could cause this?[/QUOTE] Check javascript console for errors, print every variable you can and check if all the values are what you expect them to be and if the callback isn't called twice. Why that toggle() function? Wrap your .click() in $(document).ready(), then get rid of your href or change it to #, then make a call to preventDefault() in the click function
Like this? [code]$(document).ready(){ $('.toggle').click(function(e) { e.preventDefault(); var $this = $(this); if ($this.next().hasClass('show')) { $this.next().removeClass('show'); $this.next().slideUp(350); } else { $this.parent().parent().find('li .inner').removeClass('show'); $this.parent().parent().find('li .inner').slideUp(350); $this.next().toggleClass('show'); $this.next().slideToggle(350); } }); }[/code] And when you say get rid of the href do you mean on the <a> using the toggle class? I'm not sure why I'm using it I just saw it in an example
[QUOTE=ikermitkiller;47453500]I've been working on this for the past two days, it's currently static just to make sure that everything is functioning correctly in terms of layout and design. Both the desktop and mobile design are done. Next step, make it actually functional with PHP. [url]http://doubleclick.science/[/url][/QUOTE] Looks pretty beautiful. Would probably think about changing the name though. [url]http://www.google.co.uk/doubleclick/[/url]
[QUOTE=Over-Run;47455710]Like this? [code]$(document).ready(){ $('.toggle').click(function(e) { e.preventDefault(); var $this = $(this); if ($this.next().hasClass('show')) { $this.next().removeClass('show'); $this.next().slideUp(350); } else { $this.parent().parent().find('li .inner').removeClass('show'); $this.parent().parent().find('li .inner').slideUp(350); $this.next().toggleClass('show'); $this.next().slideToggle(350); } }); }[/code] And when you say get rid of the href do you mean on the <a> using the toggle class? I'm not sure why I'm using it I just saw it in an example[/QUOTE] That looks fine, yes, and by "getting rid of the href", I meant, replace it with href="#", your e.preventDefault() will make sure nothing happens with the #.
[QUOTE=Cyberuben;47456627]That looks fine, yes, and by "getting rid of the href", I meant, replace it with href="#", your e.preventDefault() will make sure nothing happens with the #.[/QUOTE] For IE8 and below: [code] $(document).ready(){ $('.toggle').click(function(e) { e.returnValue = false; if (e.preventDefault) e.preventDefault(); var $this = $(this); if ($this.next().hasClass('show')) { $this.next().removeClass('show'); $this.next().slideUp(350); } else { $this.parent().parent().find('li .inner').removeClass('show'); $this.parent().parent().find('li .inner').slideUp(350); $this.next().toggleClass('show'); $this.next().slideToggle(350); } }); } [/code]
[QUOTE=Jelly;47454311]Released [URL="http://babeljs.io/blog/2015/03/31/5.0.0/"]v5.0.0[/URL] of my thing. Also got a fancy [URL="http://babeljs.io/users/"]users[/URL] page that I love to show off.[/QUOTE] Looks nice but loads of broken images for some reason. [url]http://babeljs.io/images/users/mozilla.svg[/url] This one's stuck in a redirect loop somehow?
I released the new version of vacstatus few days ago. I'm really happy with the new layout i have for the backend. I've also been getting double the amount of users viewing per day compared to my older version of vacstatus. [url]https://vacstat.us/[/url] [url]https://github.com/jung3o/VacStatus[/url] Made with Laravel 5 and ReactJS for frontend [editline]4th April 2015[/editline] Also been using gitflow for this. I learned i should test my pr more before actually accepting. Or results in many many broken pr's
[QUOTE=Cyberuben;47456627]That looks fine, yes, and by "getting rid of the href", I meant, replace it with href="#", your e.preventDefault() will make sure nothing happens with the #.[/QUOTE] That didn't work for me. Any other ideas? EDIT If I use the jQuery above and his HTML should it work? Cause it isn't [code] <ul class="accordion"> <li> <a class="toggle" href="#;">General Purpose</a>[/code]
[QUOTE=benbb;47457480]Looks nice but loads of broken images for some reason. [url]http://babeljs.io/images/users/mozilla.svg[/url] This one's stuck in a redirect loop somehow?[/QUOTE] Probably have a shit browser or Cloudflare is redirecting you for some reason. Works fine for me.
[QUOTE=Jelly;47459030]Probably have a shit browser or Cloudflare is redirecting you for some reason. Works fine for me.[/QUOTE] It's fixed now. IDK what was causing it. I'm on Chrome (stable).
[QUOTE=Over-Run;47457973]That didn't work for me. Any other ideas? EDIT If I use the jQuery above and his HTML should it work? Cause it isn't [code] <ul class="accordion"> <li> <a class="toggle" href="#;">General Purpose</a>[/code][/QUOTE] Get rid of the ;, it shouldn't be there, but put console.log()s everywhere to see if it actually executes your code and gives the variables you expect.
The code doesn't seem to execute but it says that there is an unexpected token on the first line of the JS file, says { was unexpected. I'm using the code posted above for IE compatibility
[QUOTE=Over-Run;47461704]The code doesn't seem to execute but it says that there is an unexpected token on the first line of the JS file, says { was unexpected. I'm using the code posted above for IE compatibility[/QUOTE] Oh fucking hell, how stupid. You have: $(document).ready() { // Body } but it should be: $(document).ready(function() { // Body });
Sorry man I'm new to jQuery. Thanks. Seems to make it open after 1 click instead of two. Still opens twice though which is weird. It's because of the slideToggle function
Are the .science domains out? It gives me "Coupon Usage Limit Exceeded.". Nevermind. It disappeared.
[code]$(document).ready(function() { // Body });[/code] this can be shortened to [code]$(function() { // code }); [/code] or none-jquery [code](function() { //code })();[/code]
[QUOTE=jung3o;47463220][code]$(document).ready(function() { // Body });[/code] this can be shortened to [code]$(function() { // code }); [/code] or none-jquery [code](function() { //code })();[/code][/QUOTE] I didn't even know that (the jQuery one), however, it's just a few characters more or less, he at least got it working.
[QUOTE=Cyberuben;47463244]I didn't even know that (the jQuery one), however, it's just a few characters more or less, he at least got it working.[/QUOTE] yeah, it's just a nice future reference! Optionally, you can just add the js code on the bottom of the page and it will work fine as well. Also, having functions like this also stops from making unnecessary global variables.
I've used Javascript/jQuery etc. for a while and still get confused over which brackets to use for things and which order to put the brackets. It's a PITA.
Sorry, you need to Log In to post a reply to this thread.