jQuery slice 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(){ $( "#sliceExample" ).on( "click", function(event) { $("div").slice(4,7).css("background","yellow"); }); }); </script> <style> div{ margin:10px; height:100px; width:100px; border:2px solid red; float:left; } </style> </head> <body> <h4 ><a href="javascript:void(0);" id="sliceExample">Click to run slice(4,7) Example </a></h4> <div>0</div> <div>1</div> <div>2</div> <div>3</div> <div>4</div> <div>5</div> <div>6</div> <div>7</div> <div>8</div> <div></div> </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(){ $( "#sliceExample" ).on( "click", function(event) { $("div").slice(4,7).css("background","yellow"); }); }); </script> <style> div{ margin:10px; height:100px; width:100px; border:2px solid red; float:left; } </style> </head> <body> <h4 ><a href="javascript:void(0);" id="sliceExample">Click to run slice(4,7) Example </a></h4> <div>0</div> <div>1</div> <div>2</div> <div>3</div> <div>4</div> <div>5</div> <div>6</div> <div>7</div> <div>8</div> <div></div> </body> </html>
Copyrights@tutorialsplane.com