V
V
VitStar2015-11-16 17:33:09
JavaScript
VitStar, 2015-11-16 17:33:09

How to remove a specific class from a block?

good afternoon!
There was a need to remove a class from a certain block. without clicking immediately after loading the page.
There is a class="sing_portfolio_min_wp" block. This block contains pictures with links. You need to remove the class from the link (iwmp-single) .

<a class="fancybox-buttons iwmp-single" data-fancybox-group="button" href="http://marketing2s.com/wp-content/uploads/2015/11/IMG_2328.jpg"><img src="http://marketing2s.com/wp-content/uploads/2015/11/IMG_2328.jpg" alt="Кухни Зов"></a>

I wrote like this
$(".sing_portfolio_min_wp").removeClass("iwmp-single");

But it doesn't work.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
De YURII, 2015-11-16
@VitStar

$( document ).ready(function() {
    $(".sing_portfolio_min_wp a").removeClass("iwmp-single");
});

jsfiddle.net/cr1hesgj

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question