Home > Web Front-end > JS Tutorial > body text

Summary of common jquery operations_jquery

WBOY
Release: 2016-05-16 16:41:42
Original
956 people have browsed it

Page load method

$().ready(function() {

})
Copy after login

div hiding operation

// div是否隐藏
function isHideMenu(){
return $("#menuContent").is(":hidden")
}
// 隐藏div
mainFrameset.hide();
// 显示div
mainFrameset.show();
Copy after login

Get object

//通过id获得
$("#menuContent");
//通过class获得
$(".menuContent");
Copy after login

Property settings

// 设置value
$("#menuContent").val("value");
// 设置css
$(".handle").css("marginLeft",5);
// 设置属性
$("img").attr("width","180");
Copy after login

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!