Calendario |
| l | m | m | g | v | s | d |
---|
25 | 26 | 27 | 28 | 29 | 30 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 1 | 2 | 3 | 4 | 5 |
|
|
My Jquery Tutorial
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head> <title>Untitled Page</title> <script src="jquery-1.6.1.js" type="text/javascript"></script> <style type="text/css"> .test { } </style>
<script type="text/javascript">
var verificato = ($('#'+idverificato+':checked').length == 1);
// Define the entry point $(document).ready(function () { // The ready function is like Override the onload event // window.onload = function () { // Now i'm shure the DOM (document object model) is constructed // We will initialize and run our plugin here // the page finished loading, do something here...
/* Please note the selector and context parameters of the jQuery function object. The selector is usually a string that selects a number of elements from the DOM. It can also be the this object (a self-reference). The jQuery selector parameter accepts the same values you would expect to use in a CSS style definition. */
// Select all elements of class: "someClass" and // apply a red border to all of them jQuery(".test").css("border", "1px solid red");
// Select an element with id: someId and insert dynamic html into it jQuery("#someId").html("<b>So Bold!</b>");
// Exactly the same as above, but using $ $("#someId").html("<b>So Bold!</b>");
ColorCellTable();
SpecialEffectExample();
}
)
function EventHandlerExample() {
$("a").click(function (event) { alert("As you can see, the link no longer took you to jquery.com"); event.preventDefault(); }); } function ColorCellTable() {
//prende tutti gli elementi TD $("td").css("color", "red");
}
function AddRemoveClassExample(className) {
$("a").addClass(className); $("a").removeClass(className);
}
function SpecialEffectExample() {
$("a").attr("onmouseover",function myfunction() { ('Visit W3Schools!') }
$("a").click(function (event) { event.preventDefault(); $(this).hide("slow"); });
$("p").click(function () { $("p").fadeOut("slow"); }); }
var oggetto = function myfunction() {
}
</script> </head> <body>
<table style="width: 100%;" class="test"> <tr> <td > a</td> <td> b</td> <td id="someId"> c</td> </tr> <tr> <td> d</td> <td> e</td> <td> f</td> </tr> <tr> <td> g</td> <td> h</td> <td> j</td> </tr> <tr> <td> Special Effects</td> <td> <p>fadeOut</p></td> <td> <a>Hide Slow</a></td> </tr> </table>
</body> </html>
venerdì, 24 giu 2011 Ore. 10.12
|
Archivio Posts |
Anno 2020
Anno 2018
Anno 2015
Anno 2013
Anno 2011
Anno 2010
Anno 2009
Anno 2008
|
Statistiche |
- Views Home Page: 14.797
- Views Posts: 57.820
- Views Gallerie: 2.837
- n° Posts: 117
- n° Commenti: 1
|
|