jQuery > Selectors

All Selector(“*”) in jQuery

How to select all elements of the page?


To select all elements of the page, we can use all selectors, for that we need to use * (asterisk symbol). 

<script language="javascript" type="text/javascript">
$("*").css("border", "5px dashed green");
</script>

Above code will select all elements of the web page and apply border width as 5 pixel, style as dashed and color as green. 

 Views: 1944 | Post Order: 10



Write for us