Posts

Showing posts from July, 2012

jQuery noConflict() method

<a href="http://www.linksmanagement.com">Link Building</a> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> < html xmlns = "http://www.w3.org/1999/xhtml">     < head >         < meta http-equiv = "Content-Type" content = "text/html; charset=utf-8" />         < title > New Web Project </ title >         < script type = "text/javascript" src = "lib/jquery/jquery-1.3.2.js">         </ script >         < script type = "text/javascript">             var jq = jQuery . noConflict ();             jq ( document ). ready ( function (){   ...

Select all checked elements :

<!DOCTYPE html > < html >     < head >         < script type = "text/javascript" src = "lib/jquery/jquery-1.3.2.js">         </ script >         < script type = "text/javascript">             $ ( document ). ready ( function (){                 $ ( ":checked" ). wrap ( "<span style='background-color:red' />" );             });         </ script >     </ head >     < body >         < form action = "">             Name: < input type = ...

Select the pre-selected item(s) in a drop down list:

<!DOCTYPE html > < html >     < head >         < script type = "text/javascript" src = "lib/jquery/jquery-1.3.2.js">         </ script >         < script type = "text/javascript">             $ ( document ). ready ( function (){                 $ ( ":selected" ). css ( "background-color" , "red" );             });         </ script >     </ head >     < body >         < form action = "">             Name: < input type = "text" name = "us...

Select all the disabled from elements:

<!DOCTYPE html > < html >     < head >         < script type = "text/javascript" src = "lib/jquery/jquery-1.3.2.js">         </ script >         < script type = "text/javascript">             $ ( document ). ready ( function (){                 $ ( ":disabled" ). css ( "background-color" , "red" );             });         </ script >     </ head >     < body >         < form action = "">             Name: < input type = "text" name = "us...

Select all the enabled from elements:

<!DOCTYPE html > < html >     < head >         < script type = "text/javascript" src = "lib/jquery/jquery-1.3.2.js">         </ script >         < script type = "text/javascript">             $ ( document ). ready ( function (){                 $ ( ":enabled" ). css ( "background-color" , "red" );             });         </ script >     </ head >     < body >         < form action = "">             Name: < input type = "text" name = "use...

Select input elements with type=”file”

<!DOCTYPE html > < html >     < head >         < script type = "text/javascript" src = "lib/jquery/jquery-1.3.2.js">         </ script >         < script type = "text/javascript">             $ ( document ). ready ( function (){                 $ ( ":file" ). css ( "background-color" , "red" );             });         </ script >     </ head >     < body >         < form action = "">             Name: < input type = "text" name = "user" ...

Select input elements with type=”image”

<!DOCTYPE html > < html >     < head >         < script type = "text/javascript" src = "lib/jquery/jquery-1.3.2.js">         </ script >         < script type = "text/javascript">             $ ( document ). ready ( function (){                 $ ( ":image" ). css ( "background-color" , "red" );             });         </ script >     </ head >     < body >         < form action = "">             Name: < input type = "text" name = "user"...

Select button elements and input elements with type=”button”

<!DOCTYPE html > < html >     < head >         < script type = "text/javascript" src = "lib/jquery/jquery-1.3.2.js">         </ script >         < script type = "text/javascript">             $ ( document ). ready ( function (){                 $ ( ":button" ). css ( "background-color" , "red" );             });         </ script >     </ head >     < body >         < form action = "">             Name: < input type = "text" name = "user...

Select button elements and input elements with type=”button”

<!DOCTYPE html > < html >     < head >         < script type = "text/javascript" src = "lib/jquery/jquery-1.3.2.js">         </ script >         < script type = "text/javascript">             $ ( document ). ready ( function (){                 $ ( ":button" ). css ( "background-color" , "red" );             });         </ script >     </ head >     < body >         < form action = "">             Name: < input type = "text" name = "user...