by Semicton
18. February 2010 16:17
jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript.
Eample: The code listed below Modifies the HTML elements on this page.
<script type="text/javascript" src="jquery-1.4.1.js"></script>
<script type="text/javascript">
$(document).ready
(function() {
$("div").click(function(event) {
event.preventDefault();
$(this).hide("slow");
});
$("a").click(function(event) { event.preventDefault(); $("div").show("slow"); $("div").addClass("testblue"); });
$("a").hover(function(event) { $(this).toggleClass("test") });
//$("div[name='testdiv']").hover(function(event) { $("div[name='testdiv']").hide("slow"); });
$("div").hover(function(event) { $(this).toggleClass("testblue") });
$("div[name='fadediv']").hover(function(event) { $("div[name='fadediv']").fadeOut("slow"); });
}
);
</script>
80b6f802-1ecd-47b9-8ebb-863cb3e52fd2|0|.0
Tags:
JQuery