jQuery, element / Html Tag Selector
You create a Html Tag and with jQuery you can manipulate it.
Syntax:
See the example below.
<html>
<head>
<style type='text/css'>
</style>
<script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js'></script>
<script type='text/javascript'>
$(document).ready(function(){
$('div').css('width','220px').css('height','110px')
.css('border','inset 6px aqua')
})
</script>
</head>
<body>
<div>This is a div tag </div><br>
<span>This is a span tag not affected by jQuery</span>
<p>This is a p tag not affected by jQuery</p>
</body>
</html>
This is a span tag not affected by jQuery
This is a p tag not affected by jQuery
Syntax:
$("element / Html TagName").css(propertyName', 'propertyValue');
See the example below.
<html>
<head>
<style type='text/css'>
</style>
<script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js'></script>
<script type='text/javascript'>
$(document).ready(function(){
$('div').css('width','220px').css('height','110px')
.css('border','inset 6px aqua')
})
</script>
</head>
<body>
<div>This is a div tag </div><br>
<span>This is a span tag not affected by jQuery</span>
<p>This is a p tag not affected by jQuery</p>
</body>
</html>
This is a div tag
This is a span tag not affected by jQuery
This is a p tag not affected by jQuery