javascript - removeAttr from multiple classes -


is possible use removeattr multiple classes , ids ? not find that.

smth dont work $('.one.two.six.eleven#box').removeattr("style"); nor this

$(".one.two.three#smth.seven").css("transition", "3s"); 

i cant manage use removeattr on multiple classes , id's not children of each other :).

i cant manage add css() many free classes in window , every has own parameters there bind deal of them.

in fiddle have basic works me long many lines. seems awfull.

thank answers.

i placed jsfiddle show mess made want 'dry' , 'lim'.

fiddle fork on...

new edit explanation

    function some_func() {     $(".some").removeattr("style");     $(".thing").css("transition", "3s");     $(".right").removeattr("style");     $(".right").css("transition", "3s");     $(".left").removeattr("style");     $(".left").css("transition", "3s");     $(".hello").removeattr("style");     $(".top").css("transition", "3s");     $("#car").removeattr("style"); } 

how make in 2 lines

$(".one.two.three#smth.seven") means selecting objects of class one, two, 3 etc. (i don't think three#smth work).

for instance: <div class="one 2 three"> selected $(".one.two.three")

if want union of objects several selectors, can comma-separate them:

$(".one, .two, .three, #smth, .seven")

this should return objects either .one or .two or .three or #smth or .seven

i.e. <div class="one"></div><div class="two"></div><div class="three"></div> selected.


Comments

Popular posts from this blog

html - Styling progress bar with inline style -

java - Oracle Sql developer error: could not install some modules -

How to use autoclose brackets in Jupyter notebook? -