Answer: Generally in HTML, if we need to work with any control on a web page we need to find the control. For that we use document.getElementByID or document.getElementByName. But in jquery we do it using Selectors.
Using this selectors we can select all the controls as well using a symbol (
* )
A sample code snippet can be of this form
<script language="javascript" type="text/javascript">
$("*").css("border", "10px red");
</script>
This will make all the borders in the web page with a width of 10 pixel and color as red.
Asked In: Many Interviews |
Alert Moderator