要紧类我体内从中我需要选择班级hs-content-path-history-of-data-pagetopic2013
选择从字符串
<body class="blog-template hs-blog-id-1815512257 hs-blog-listing hs-content-path-history-of-data-pagetopic2013 hs-blog-name-history-of-data-page"></boby>
var bodyClass = $('body').attr('class');
// select needfull class from var above
if(selectedClass === 'hs-content-path-history-of-data-pagetopic2013'){
// it works!
}
一些类如何可以选择从体类hs-content-path-history-of-data-pagetopic2013
?
什么是我们的实际需要? – 2014-10-17 08:05:13
bodyClass returns me - “blog-template hs-blog-id-1815512257 hs-blog-listing hs-content-path-history-of-data-pagetopic2013 hs-blog-name-history-of-data-page”。从这个字符串我需要选择这个类“hs-content-path-history-of-data-pagetopic2013” - 然后,当我得到它我需要比较它whith“hs-content-path-history-of-data -pagetopic2013“并在此之后执行操作 – Mongo 2014-10-17 08:08:16