jQuery prevUntil Method
home
Run
screen_rotation
fullscreen
cloud_download
<!DOCTYPE html> <html> <head> <title>jQuery Demo example</title> <script type="text/javascript" src="http://code.jquery.com/jquery-2.1.4.min.js"> </script> <script type="text/javascript"> $(document).ready(function(){ $( "#prevUntilExample" ).on( "click", function(event) { $("li.Myparali").prevUntil("li.level-two").css("border","1px solid red"); }); }); </script> </head> <body> <ul > <li> First Item</li> <li class='level-two'> Second Item</li> <li> Third Item</li> <li> Fourth Item</li> <li class="Myparali"> <p><span>Find My Prev Elements up to "second Item" </span></p> </li> </ul> <h4><a href="javascript:void(0);" id="prevUntilExample">Click to run prevUntil() Example </a></h4> </body> </html>
<!DOCTYPE html> <html> <head> <title>jQuery Demo example</title> <script type="text/javascript" src="http://code.jquery.com/jquery-2.1.4.min.js"> </script> <script type="text/javascript"> $(document).ready(function(){ $( "#prevUntilExample" ).on( "click", function(event) { $("li.Myparali").prevUntil("li.level-two").css("border","1px solid red"); }); }); </script> </head> <body> <ul > <li> First Item</li> <li class='level-two'> Second Item</li> <li> Third Item</li> <li> Fourth Item</li> <li class="Myparali"> <p><span>Find My Prev Elements up to "second Item" </span></p> </li> </ul> <h4><a href="javascript:void(0);" id="prevUntilExample">Click to run prevUntil() Example </a></h4> </body> </html>
Copyrights@tutorialsplane.com