jquery 代码参考
- jQuery(document).ready(function($){});
- jQuery(window).on('load', function(){});
- $('.video_section[data-name="'+id+'"]').removeClass('hide').siblings().addClass('hide');
- if($('.menu_desktop').is(':visible')){};
- $(this).parents('ul').find('a').each(function(){});
常用js代码
function getCookie(cname) {
var name = cname + "=";
var decodedCookie = decodeURIComponent(document.cookie);
var ca = decodedCookie.split(';');
for(var i = 0; i < ca.length; i++) {
var c = ca[i];
while (c.charAt(0) == ' ') {
c = c.substring(1);
}
if (c.indexOf(name) == 0) {
return c.substring(name.length, c.length);
}
}
return "";
}
学习链接
未完,,后续更新中,,