开发者

How can I hide an id from its contents in Javascript/jQuery?

I have a bunch of this videos on this website with this source:

<li id="vidLink-1498229769" class="videoContainer vidLink">
    <a href="/p/watch/1498229769:GM1ryG4eoTA6sMZV9wtDEpocuehpzDni">
        <span class="content-video-thumb-hover"></span>
        <img src="http://lockerz.vo.llnwd.net/o35/Lockerz/14/593/MEVIO-EmoGirlTV-SavesTheDay-TH1.jpg" id="clThumb_1498229769" class="videoThumb">
    </a>
    <a href="/p/watch/1498229769:GM1ryG4eoTA6sMZV9wtDEpocuehpzDni" class="videoTitle">Emo Girl TV - Saves the Day Interview</a>
                    <span class="PTZ-status PTZ-awarded">PTZ have been awarded for watching this video.</span>
开发者_运维技巧

Is it possible to hide the entire id, the vidlink-*** part if the span class is that?

<span class="PTZ-status PTZ-awarded">PTZ have been awarded for watching this video.</span>

I want to hide the videos I've already seen in the site (with greasemonkey), but I have no idea how...


If you're trying to hide the entire vidLink if it contains a .PTZ-status, you can do it like this:

$('.vidLink:has(.PTZ-awarded)').hide();
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜