<script src="//code.jquery.com/jquery-1.10.2.js"></script> $("p").addClass("class1 class2");
removeClass(className);
<script src="//code.jquery.com/jquery-1.10.2.js"></script> $("p").removeClass("className");
$("#rdb_active").prop("checked",true);
$("#rdb_active").prop("checked",false);
$("#control_id").prop("disabled",true);
$("#control_id").prop("disabled",false);
jQuery.fn.jquery;
$.fn.jquery;
jQuery().jquery;
$().jquery;
$.ui.version
jQuery.ui.version;
$('#tbl tr:last').remove();
$('#tbl tr:eq(4)').remove();
<div id = div_1" class = "class1"> <div id = div_2" class = "class2">container 1</div> <div id = div_3" class = "class2">container 2</div> </div> $('.class1').length; Output:- 1 $('.class2').length; Output:- 2
$('#div_project').css('background-image', 'url(my_image.jpg)');
$('#div_project).css('background','url(path/to/image.jpg)');
<!doctype html> <html lang ="en"> <head> <meta charset="utf-8"> <title>addClass demo</title> <style> p { margin: 8px; font-size: 16px; } .selected { color: red; } .highlight { background: yellow; } </style> <script src="//code.jquery.com/jquery-1.10.2.js"></script> </head> <body> <p>DotNet</p> <p>Funda</p> <p>Website</p> <script> $("p:last").addClass("selected highlight"); </script> </body> </html>
$('a').prop('target','_blank');
$('a').each(function(){ $(this).prop('target','_blank'); });