Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /home/project-web/jquery4php/lib/YepSua/Labs/RIA/jQuery4PHP/YsJQueryBuilder.php on line 127
Deprecated: substr(): Passing null to parameter #1 ($string) of type string is deprecated in /home/project-web/jquery4php/lib/YepSua/Labs/RIA/jQuery4PHP/YsJQueryBuilder.php on line 127
Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /home/project-web/jquery4php/lib/YepSua/Labs/RIA/jQuery4PHP/YsJQueryBuilder.php on line 127
Deprecated: substr(): Passing null to parameter #1 ($string) of type string is deprecated in /home/project-web/jquery4php/lib/YepSua/Labs/RIA/jQuery4PHP/YsJQueryBuilder.php on line 127
Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /home/project-web/jquery4php/lib/YepSua/Labs/RIA/jQuery4PHP/YsJQueryBuilder.php on line 127
Deprecated: substr(): Passing null to parameter #1 ($string) of type string is deprecated in /home/project-web/jquery4php/lib/YepSua/Labs/RIA/jQuery4PHP/YsJQueryBuilder.php on line 127
Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /home/project-web/jquery4php/lib/YepSua/Labs/RIA/jQuery4PHP/YsJQueryBuilder.php on line 127
Deprecated: substr(): Passing null to parameter #1 ($string) of type string is deprecated in /home/project-web/jquery4php/lib/YepSua/Labs/RIA/jQuery4PHP/YsJQueryBuilder.php on line 127
Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /home/project-web/jquery4php/lib/YepSua/Labs/RIA/jQuery4PHP/YsJQueryBuilder.php on line 127
Deprecated: substr(): Passing null to parameter #1 ($string) of type string is deprecated in /home/project-web/jquery4php/lib/YepSua/Labs/RIA/jQuery4PHP/YsJQueryBuilder.php on line 127
ToggleClass
Add or remove one or more classes from each element in the set of matched elements, depending on either the class's presence or the value of the switch argument.<input type="button" value="Toggle Class" id="btnToggleClass" /> <div align="center"> <table id="tblToggleClass"> <tr><td>Lorem ipsum dolor sit amet</td></tr> <tr><td>consectetur adipisicing elit</td></tr> <tr><td>sed do eiusmod tempor incididunt ut</td></tr> <tr><td>labore et dolore magna aliqua</td></tr> <tr><td>Ut enim ad minim veniam</td></tr> <tr><td>quis nostrud exercitation ullamco laboris</td></tr> <tr><td>nisi ut aliquip ex ea commodo consequat.</td></tr> </table> <?php echo YsJQuery::newInstance() ->onClick() ->in('#btnToggleClass') ->execute( YsJQuery::toggleClass('even')->in('#tblToggleClass tr:even'), YsJQuery::toggleClass('odd')->in('#tblToggleClass tr:odd') ) ?> </div>
Lorem ipsum dolor sit amet |
consectetur adipisicing elit |
sed do eiusmod tempor incididunt ut |
labore et dolore magna aliqua |
Ut enim ad minim veniam |
quis nostrud exercitation ullamco laboris |
nisi ut aliquip ex ea commodo consequat. |
Support requests, bug reports, and off-topic comments will be deleted without warning.