I tried putting an image link inside the box, but when I hover over it the image shows up in the div before the box actually slides down. Any suggestions?
I don't know if any one has pointed this out, but the CSS for rounding corners in Firefox is wrong. It's supposed to be -moz-border-radius-topleft: -moz-border-radius-topright: and so on and so on. Other than that, great stuff. Thanks for the tut. :)
This looks cool but there's gotta be a better way to do it. You're using slideToggle() twice and it's already a toggle, so using it twice seems redundant. I would think it would be better to have slideDown() for the first hover function argument then slideUp() for the second. It does the same thing but seems more correct in terms of the jquery method used.
I don't know if any one has pointed this out, but the CSS for rounding corners in Firefox is wrong. It's supposed to be -moz-border-radius-topleft: -moz-border-radius-topright: and so on and so on. Other than that, great stuff. Thanks for the tut. :)
Nice Tut optikalefxx. WHY? Because it is done at a good flowing pace, and yet informative. Nice narration to. I know all the stuff in this tut, but i wish I had seen it when I was learning. Good effort!!!
Could you please help with this, I was able to change it so that instead of when you hover over it and it slides down, you have to click it. I achieved this by changing .hover() to .click(). However how could I make the header change to a different color when the box is showing, and back to orange when the tab isn't. Please help, I'm new to JQuery.
Just a note that this video uses code which is *not* supported in all the major browsers - for instance, the rounded corners code that is used is not support in the latest version of IE which is version 8.
@optikalefxx yeah truly, i agree with u fully, i mean dear Gawd,, if u can program jquery why would u use IE8.. or IE in any universe or for any reason even as an end user... most people are finally adapting to firefox atleast and samsung is pushing the google browsing concept... so im sure 2 years from now everything will be a ok for any scripts.. screw IE9 aswell... go chrome or go home.. yay for safari and dnt run with the flocks get firefox... lol.. thanks for the awesome tut.
you should test it, but since im using jQuery it should work all the way down to IE6. Although i don't recommend using IE6 because you will inevitably get a virus.
Thanks a lot for this tutorial. It works great on my website! I would really like to use the mouseover and mouseout commands instead of the hover, but I am not too familiar with javascript (the "if" statement you are discussing above). If you have any time, could I get that code from you (or anyone)? I would appreciate it a lot.
Nice job. But this would not work to well for a menu since with the hover action, once you hover away from the .header, the displayed .box toggles back. Is there a away to keep the displayed box open until you hover away from BOTH the .header and .box?
what you mean to say, is can we keep the displayed box opne until you hover away from both the .header OR the .box. If you say it like that, you can almost see how the if statement will look. So, ill leave it to you, use mouseover and mouseout instead of hover, and use that if condition that you almost wrote already. Let me know if you need help.
Can you post the HTML too? When you use ($this) you are referring to the element that has $(".class") when you $(this).next() you are referring to its sibling. You may be trying to get to its CHILD instead. If i see the HTML i can tell you what you gotta do.
Is there a way to tell the jquery to slide a certain div tag? Because i've watched this video three times now and i can't see you entering anything about the "box" div in the jquery.
I tried putting an image link inside the box, but when I hover over it the image shows up in the div before the box actually slides down. Any suggestions?
wesmck20 2 months ago
you should get notepad++ (unless you already have)
MrMaestro14231 3 months ago
@MrMaestro14231 i use textwrangler on the mac. It blows notepad++ out of the water
optikalefxx 3 months ago
3:26 Wrong..... border-radius:12px; works in all versions of IE.(maybe not all, but you get me).
csyicker 7 months ago
I don't know if any one has pointed this out, but the CSS for rounding corners in Firefox is wrong. It's supposed to be -moz-border-radius-topleft: -moz-border-radius-topright: and so on and so on. Other than that, great stuff. Thanks for the tut. :)
calctmnt 1 year ago
This looks cool but there's gotta be a better way to do it. You're using slideToggle() twice and it's already a toggle, so using it twice seems redundant. I would think it would be better to have slideDown() for the first hover function argument then slideUp() for the second. It does the same thing but seems more correct in terms of the jquery method used.
BopjoWebDesign 1 year ago
wow, cool video. Thanks alot
FreddieBambino 1 year ago
I don't know if any one has pointed this out, but the CSS for rounding corners in Firefox is wrong. It's supposed to be -moz-border-radius-topleft: -moz-border-radius-topright: and so on and so on. Other than that, great stuff. Thanks for the tut. :)
pbsallad 1 year ago
@pbsallad Youre right
calctmnt 1 year ago
Nice Tut optikalefxx. WHY? Because it is done at a good flowing pace, and yet informative. Nice narration to. I know all the stuff in this tut, but i wish I had seen it when I was learning. Good effort!!!
Thealedela 1 year ago
Could you please help with this, I was able to change it so that instead of when you hover over it and it slides down, you have to click it. I achieved this by changing .hover() to .click(). However how could I make the header change to a different color when the box is showing, and back to orange when the tab isn't. Please help, I'm new to JQuery.
pstap92 1 year ago
@pstap92 So what you need to do is in the click, select the tab with jquery and run .css("background-color","blue")
and then for making it go back, whenever it slides back up, also have it select the tab and do .css("background-color","orange")
If you send me code I can show you with your code.
optikalefxx 1 year ago
@optikalefxx I can make it change color, however I can't get it to change back.
pstap92 1 year ago
@pstap92 your hover must not be right. make sure you have the right syntax for the hover method.
you can always use mouseover and mouseout as separate functions instead of hover.
optikalefxx 1 year ago
Comment removed
pstap92 1 year ago
Comment removed
pstap92 1 year ago
Comment removed
pstap92 1 year ago
Just a note that this video uses code which is *not* supported in all the major browsers - for instance, the rounded corners code that is used is not support in the latest version of IE which is version 8.
c532869 1 year ago
@c532869 This makes me smile.
Screw microsoft.
optikalefxx 1 year ago 5
@optikalefxx Amin
D3w10n 1 year ago
@optikalefxx yeah truly, i agree with u fully, i mean dear Gawd,, if u can program jquery why would u use IE8.. or IE in any universe or for any reason even as an end user... most people are finally adapting to firefox atleast and samsung is pushing the google browsing concept... so im sure 2 years from now everything will be a ok for any scripts.. screw IE9 aswell... go chrome or go home.. yay for safari and dnt run with the flocks get firefox... lol.. thanks for the awesome tut.
xyn333 1 year ago
ic.. im kinda new to jquery.. anyway to show a quick clip on how to make the boxes go upwards instead? :D
TheSuwage23 1 year ago
hey.. just wondering.. how do you make the bars slide upwards instead of downwards? many thanks.. please reply asap.. :D
TheSuwage23 1 year ago
@TheSuwage23 you would need to custom animate the height.
first setup your html so that as you adjust the height manually you get the effect you want. Then setup a .animate() to follow what you did manually.
optikalefxx 1 year ago
could you make an onclick on onmousedown I am new to using jquery.
nickwyatt123 1 year ago
How do you do that big space? Like I have to press the space bar 5 or 6 times to get that lenght, when you press it once.
nickwyatt123 1 year ago
@nickwyatt123 in the code? im using the TAB key.
optikalefxx 1 year ago
This has been flagged as spam show
That's sweet dude! :) Thank you so much for this video; it made it really simple for me, and launched me into the world of jquery
johnprattchristian 1 year ago
That's sweet dude! :) Thank you so much for this video; it made it really simple for me, and launched me into the world of jquery. Bless you
johnprattchristian 1 year ago
cool thx
saintdo 1 year ago
thanks, cool tutorial
conillusionist 1 year ago
You made a slight mistake with your rounded edges.
For mozilla you need to use this "-moz-border-radius-bottomleft:10px;" format or else it won't work.
intense7 2 years ago
hi nice job!, it only works whit mozilla? or it can be used by any explorer?
jlseijof 2 years ago
you should test it, but since im using jQuery it should work all the way down to IE6. Although i don't recommend using IE6 because you will inevitably get a virus.
optikalefxx 2 years ago
Comment removed
SAMY2690 2 years ago
i will send you a private message of my complete code
zigzag1234567890 2 years ago
@zigzag1234567890
Totally innovative... nice job!
Would you mind giving me your code as well...
Thanks
natelake1nate 2 years ago
um hey, how do you put a video as the content
zigzag1234567890 2 years ago
Thanks a lot for this tutorial. It works great on my website! I would really like to use the mouseover and mouseout commands instead of the hover, but I am not too familiar with javascript (the "if" statement you are discussing above). If you have any time, could I get that code from you (or anyone)? I would appreciate it a lot.
trtlpwr80s 2 years ago
send me a message with details
optikalefxx 2 years ago
Nice job. But this would not work to well for a menu since with the hover action, once you hover away from the .header, the displayed .box toggles back. Is there a away to keep the displayed box open until you hover away from BOTH the .header and .box?
giantsfan245 2 years ago
what you mean to say, is can we keep the displayed box opne until you hover away from both the .header OR the .box. If you say it like that, you can almost see how the if statement will look. So, ill leave it to you, use mouseover and mouseout instead of hover, and use that if condition that you almost wrote already. Let me know if you need help.
optikalefxx 2 years ago
@giantsfan245 - using a click handler instead of hover seems more user-friendly to me. Then the code would be shortened to just:
$('.header').click(function () {
$('.box').slideToggle();
});
BopjoWebDesign 1 year ago
awesome job, can't wait to see more
codeCola196 2 years ago
By the way, in the video, when I refer to ($this) im referring to the Header div, and you see in the HTML how "box" is next to "header"
Thats why i am animated $(this).next() which is equivelant to $(".header").next() and equivelant to $(".box").slide
The trick is that I want to use next() so I dont need to refer to each element individually.
optikalefxx 2 years ago
Ok, and which element specifically do you want to slide?
optikalefxx 2 years ago
Can you post the HTML too? When you use ($this) you are referring to the element that has $(".class") when you $(this).next() you are referring to its sibling. You may be trying to get to its CHILD instead. If i see the HTML i can tell you what you gotta do.
optikalefxx 2 years ago
Alright. I'll post the url on the forum. Thnx for the help.
NikkexD 2 years ago
I posted it in the wrong category on the forum, so they asked me to re-post it.
codingforums com/showthread php?p=812701#post812701
(add the dots)
NikkexD 2 years ago
if it has a class then you do $(".className")
if it has an id then yo do $("#idname")
optikalefxx 2 years ago
I just tried it. It does slide, but it doesn't slide the right element. It slides the element below.
I posted it on a forum. Please take a look. :)
codingforums com/showthread php?t=165439
(add the dots)
NikkexD 2 years ago
Is there a way to tell the jquery to slide a certain div tag? Because i've watched this video three times now and i can't see you entering anything about the "box" div in the jquery.
NikkexD 2 years ago
Awesome! Thnx dude :D
NikkexD 2 years ago