jQuery prevAll Method
home
Run
screen_rotation
fullscreen
cloud_download
navigate_before
<!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(){ $( "#prevExample" ).on( "click", function(event) { $("p").prevAll("div").css("border","1px solid red"); }); }); </script> </head> <body> <div>Demo Div...1........</div> <div>Demo Div...2.......</div> <div>Demo Div...3.......</div> <div>Demo Div....4......</div> <p>Demo para 1............</p> <p class="para2">Demo para 2............</p> <p>Demo para 2............</p> <p class='para4' >Demo para 4............</p> <h4><a href="javascript:void(0);" id="prevExample">Click to see prevAll() 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(){ $( "#prevExample" ).on( "click", function(event) { $("p").prevAll("div").css("border","1px solid red"); }); }); </script> </head> <body> <div>Demo Div...1........</div> <div>Demo Div...2.......</div> <div>Demo Div...3.......</div> <div>Demo Div....4......</div> <p>Demo para 1............</p> <p class="para2">Demo para 2............</p> <p>Demo para 2............</p> <p class='para4' >Demo para 4............</p> <h4><a href="javascript:void(0);" id="prevExample">Click to see prevAll() Example </a></h4> </body> </html>
Copyrights@tutorialsplane.com