JQuery/PHP

JQUERY implements clicking Add Class and then clicking Remove Class

 Alibaba Cloud

JQUERY click the effect of repeated changes, which is often used to toggle () for the display and hiding of DIV. Can you click Add Class and then click Remove Class? JQUERY toggleClass() can achieve the effect you require. Click to add a class, and then click to remove the class.

  1.  $ ( ".mol_navs" ) . click ( function ( ) {
  2.  $ ( this ) . toggleClass ( "mol_navs2" ) ;
  3.  } )
Want to be here? contact us bar
 Maker host

You can also control multiple elements at the same time

  1.  $ ( ".molicon" ) . click ( function ( ) {
  2.  $ ( this ) . toggleClass ( "xz" ) . parents ( ) . siblings ( ) . find ( ".molicon" ) . removeClass ( "xz" ) ;
  3.  } )

JQUERY implements clicking Add Class and then clicking Remove Class

271 people have bought
View Demo Upgrade VIP Buy Now

Collection
fabulous ( zero )

Post reply

Hot selling template

Ashade - Works exhibition photo album WordPress Chinese theme
 LensNews

This site accepts WordPress/PbootCMS/DedeCMS, etc
System construction, imitation, development, customization and other services!