Musings
Public · Protected · Private
Jquery Events
-
2012-04-26 11:24$(document).ready(function) attach a function to document after it is ready $(selector).click(function) attach a function to selected item after it is clicked $(selector).dblclick(function) attach a function to selected item after it is double clicked $(selector).focus(function) attach a function to selected item after it gets focus $(selector).mouseover(function) attach a function to selected item after it is hovered
-
2012-04-26 11:27<script type="text/javascript"> var flipper = true; $(document).ready(function(){ $("button").click(function(){ if(flipper) { $("p").hide(300); flipper = false; $(this).Value= 'show'; } else { $("p").show(300); flipper = true; } }); }); </script> <button>Hide</button> <p>slowly hide me by clicking button.</p> <p><b>$("div#details .head") Selects all elements with class="head" inside a div element with id="details"</b></p>
This blog is frozen. No new comments or edits allowed.