samedi 30 juillet 2016

Can jQuery nextUntil perform my function

I can do this

        $("#id")
            .closest("div")
            .nextUntil("div.stop-class")
            .addClass("new-class");

What I want to do is this

        $("#id")
            .closest("div")
            .nextUntil("div.stop-class")
            .myFunction(someParameter);

I can extend jQuery, but is there another way?

Aucun commentaire:

Enregistrer un commentaire