E
E
Evgen2015-09-29 19:38:52
JavaScript
Evgen, 2015-09-29 19:38:52

How to get rid of "Chained call to function" in JSCS check?

Hello.
I have code that looks like this:

if ($(pr).hasClass('discounts-more_closed')) {
        $(pr).removeClass('discounts-more_closed');
...

At the same time, the JSCS plugin installed in PHPStorm indicates errors, in particular, for
$(pr).hasClass
Chained call to function "hasClass"

etc. on each function call through a dot.
How can this be overcome?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question