最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Select parent from child class name then add another class name to the parent

programmeradmin2浏览0评论

I'm trying to add another class name to a parent div of an article. I want to select 2 class names then add another class name to the parent. I'm pretty new to js/JQuery this is what i've not so far.

jQuery(document).ready(function(){
jQuery('.random-1 .category-49').parent('div').addClass('double-width');
});
发布评论

评论列表(0)

  1. 暂无评论