2012年3月26日星期一

Moncler OutletJQueryTable : 1 mobile mouse line of color method one: jQuery hover ( fun )

JQueryTable : 1 mobile mouse line of color method one: jQuery hover ( fun ) ,fun ( ) ( ) method ,parameter : the first method is to add a style function ,parameter two :second be to cancel the style function $ ( " # ;table1 tr" ;hover ( function ( ) ) .
{$ ( this ) . Children ( " ;td" ;) . AddClass ( " ;hover" ;function ) } ,( ) {$ ( this ) . Children ( " ;td" ;) . RemoveClass ( " ;hover" ;} ) ) method two :$ ( " ;# table1 tr : GT ( 0) " ;) .
Hover ( function ( ) {$ ( this ) . Children ( " ;td" ;) . AddClass ( " ;hover" ;) ;} ,function ( ) {$ ( this ) . Children ( " ;td" ;) . RemoveClass ( " ;hover" ;) ;} ) ;2 parity line different colors of $ ( " ;table1 tbody tr: odd" # ;) .
CSS ( " ;background-color" ;" ;bbf" ,# ;) ;$ ( " ;table1 tbody tr: even" # ;) . CSS ( " ;background-color" ;" ;ffc" ,# ;) ;$ ( " ;table1 tbody tr # : odd" .
AddClass ( ) ;" ;odd" ;) $ ( " ;table1 tbody tr: even" # ;) . AddClass ( " ;even" ;3 ) a $ ( " ;table1 tbody tr # : EQ ( 3) " ;) . Hide ( ) ;4 hides a Column method :$ ( " ;table1 tr # Td :: nth-child ( 3) " ;) .
Hide ( ) ;two :$ ( " ;table1 tr" # ;) . Each ( function ( ) {$ ( " ;TD: EQ ( 3) ," ;this ) . Hide ( ) } ) ;5 row deleted / / removed except for the first row of all bank $ ( " ;table1 tr: not # ( " :first ) ;) .
Remove ( ) ;/ / delete the specified row $ ( " ;# table1 tr : EQ ( " ;3 ) ) . Remove ( ) ;6 to remove a column / / delete except the first column of all listed $ ( " ;th : not ( table1 tr # :nth-child ( 1) " ;) ) .
Remove ( ) ;$ ( " ;TD : not ( table1 tr # :nth-child ( 1) " ;) ) . Remove ( ) ;/ / delete the first column of $ ( " ;table1 tr # Td :: nth-child ( 1) " ;) .
Remove ( ) ;7 ( set ) a unit # 26684 & ;& # 20540 ;/ / set the table1 ,second tr first TD value .$ ( " ;# table1 tr : EQ ( 1) Td: nth-child ( " ;1 ) ) . HTML ( " ;value" ;) ;/ / get the table1 ,second tr first TD value .
$ ( " ;# table1 tr : EQ ( 1) Td: nth-child ( " ;1 ) ) . HTML ( ) ;8 is inserted in a row :/ / second tr after insertion of a $ ( " ;< ;tr> ;< ;td> ;insert into 3< / td> ;< ;td> ;insert ;< / td> ;< ;td> ;< ;insert ;/ td> ;< ;td> ;insert into < / td> ;< ;tr> ;" ;insertAfter ;) ( $ ( " ;# table7 tr : EQ ( 1) " ;) ) ;9 ,Moncler Outlet,for each row specifies the unit & # 26684 ;& # 20540 ;VAR arr = ;$ ( " table1 tr Td: nth-child # ;" ;( 1 ) ) .
Each ( function ( key ,value ) {arr.push ($ ( this ) . HTML ( ) ) ;} ) ;VAR result = arr.join ( , ) ;10 ,check or uncheck all / / A :/ / select all or uncheck all the parameters such as :event checkAll ( event ) function checkAll ( EVT ) {EVT = EVT ?EVT: window.
event ;VAR chall = evt.target ?Evt.target: evt.srcElement ;VAR TBL = $ ( " # ;table1" ;) ;VAR trlist = tbl.find ( " ;tr" ;) ;for ( VaR I = 1 ;i< ;trlist.length ;I + + ) {var tr = $ ( trlist ) ;VAR input = tr.
find ( " ;INPUT type = ;input.attr ( " ;checked" ) ;,Men Nike Running Shoes,chall.checked ) ;} } ;/ / method two :/ / select all or uncheck all the parameters such as :this checkAll ( this ) funct Ion checkAll ( EVT ) {var TBL = $ ( " ;table1" # ;) ;VAR trlist = tbl.
find ( " ;tr" ;) ;for ( VaR I = 1 ;i< ;trlist.length ;I + + ) {var tr = $ ( trlist ) ;VAR input = tr.find ( " ;INPUT ) ;input.attr ( " ;" ;checked" ;,evt.
checked ) ;} } / / method three :/ / select all or uncheck all the parameters such as :this checkAll ( this ) function checkAll ( EVT ) {$ ( " # ;table1 tr" ;find ) .
( " ;input type = " ;) . Each ( function ( I ) {$ ( this ) . Attr ( " ;checked" ;,Cheap Beats By Dre,evt.checked ) } ) ;} / / method four :/ / select all or uncheck all the parameters such as :this checkAll ( this ) function checkAll ( EVT ) {$ ( " ;table1 tr" # ;) .
Find ( " ;input type = " ;) . Attr ( " ;checked" ;evt.checked ;} ,) 11 ,the client dynamically add ,delete rows row function btnAddRow ( ) { / / line is started from 0 the last line is added ,deleted ,the Save button line ,the minus 2var rownum = $ ( " # ;table1 tr" ;VaR ) .
Length-2 ;chk = " ;< ;input type = = ;rownum+" ;name = chk_" ;rownum+" ; " / > ;;VaR ;text = " ;< ;input ty PE = text id = txt_" ;rownum+" ;name = txt_" ;rownum+" ; = ;" ;VaR ;sel = " ;< ;select id = sel_" ;rownum+" ;> ;< ;option value = 1 ;male < / option> ;< ;option ;value = 0 ;female < ;/ option> ;< ;" ;VaR ;select> ;row = " ;< ;tr> ;< ;td> ;" ;chk+" ;< ;< ;td> ;td> " ;text+" ;< ;/ td> ;< ;td> ;" ;sel+" ;< ;< ;td> ;td> " ;text+" ;< ;< ;td> ;td> " ;text+" ;< ;td> ;< ;" / tr> ;;;$ ( row ) .
InsertAfter ($ ( " ;# table1 tr: EQ ( " ;rownum+" ;" ;) ) ) ;} / / client delete line / / you can only delete line ,delete rows error function btnDeleteRow ( ) {$ ( " # ;table1 tr" ;" .
Find ( ) ;input type = " ;) . Each ( function ( I ) {if ($ ( this ) . Attr ( " ;checked" ;) ) {if ( I != 0 ) / / rows cannot be deleted on {$ ( " ;table1 tr: EQ # ( " ;i+" ;" ;) ) .
Remove ( ) ;} } } ) ;} / / this is better than the above ,Moncler Outlet Online,can delete record function btnDeleteRow ( ) {$ ( " ;table1 tr" # ;) . Each ( function ( I ) {var chk = $ ( this ) .
Find ( " ;input type = ;if ( ) ;chk.attr ( " ;id" ;) != " ;checkall" ;) / / cannot delete header {if ( chk.attr ( " ;checked" ;) ) {$ ( this ) .
Remove ( ) ;} } } ) ;} / / client save function btnSaveClick ( ) { / / find ( ) method of I don how to set the filter conditions ,Monster Headphones,so the following is list of select value / / $ ( " ;table1 tr td" # ;) .
Find ( " ;input type = " ;" ;select" ;) . Each ( function ( I ) { / / Alert ($ ( this ) . Val ( ) ) ;/ / } ) ;$ ( " ;table1 tr" # ;) . Find ( " ;td" ;) .
Each ( function ( I ) {if ($ ( this ) .Find ( " ;input type = " . Length> ;) ;0) {alert ($ ( this ) . Find ( " ;input type = " ;) . Val ( ) ) ;} else if ($ ( this ) .
Related articles:

没有评论:

发表评论