Umm I think this is the right spot, but I really need help heh Well what I am trying to do is make this box fade in 5 seconds, but it isn't working. This is what I got so far: $(function() { $("#Clickme").click(function() { $("#Box").fadeout(5000); }); }); And it isn't working, I think I type every thing right, but I don't know I'm lost :/
Let's use the traditional function lol function fadeMe() { $("#Box").fadeout(5000); } Code (markup): And add "fadeMe()" to onclick event.
Wait I'm confused lol i got it so when div id="click me" is clicked the function would would be the box well fade out but im not getting your way fully
[COLOR="Red"][I]$(function() {[/I][/COLOR] $("#Clickme").click(function() { $("#Box").fadeout(5000); }); [COLOR="Red"][I]});[/I][/COLOR] Code (markup): remove the red parts... what you did, was create a function (with that first line) that would add all the functionality you wanted. But you never called this function .. so the click event never got attached..
Ok, what about this one, i hope this works. $(document).ready(function() { $("#Clickme").click(function() { $("#Box").fadeout(5000); }); }); Code (markup):
Its still not working :/ I have my Html like <div id="Clickme"> <a href="#">Click Me!</a> </div> I could have it like <a href="#">Click Me!</a> and $(document).ready(function() { $("a").click(function() { $("#Box").fadeout(5000); }); }); but that also doest work and I really dont know what to do >_<
Hi, this is happening because you the fadeout needs to be fadeOut (with a capital O) hope this will save you a few hair
Still not working :/ its maybe how I linked my html to the js and jquery libary <script src="js/jquery-1.2.6.min.js" type="text/javascript" charset="utf-8"></script> <script src="js/Java.js" type="text/javascript" charset="utf-8"></script>
hmm... not sure about the charset part .. try linking to it directly from the jquery site, to check if that is the issue <script src="http://code.jquery.com/jquery-latest.js"></script> HTML:
What's the URL to the site. It's always easier to help that way. You're not clicking on the div, you would need to make it so that it applies to the URL when clicked. The URL would need to have <a href="..." id="Clickme">Click Me</a> <div id="box"> <a href="blah" id="clickme">Click me</a> </div> HTML: JQuery: $(document).ready(function() { $('#clickme').click(function() { $('#box').fadeOut(5000); }); }); Code (markup):