I have a scenario in which I want create I need to set the display of several elements with the same class. My thinking was to create a custom jQuery function that contains a For Loop that would do this. I'm still learning jQuery and I've never created a custom function like you would in Javascript. The below code is what I need to put into this function. Should I just do this in Javascript?
Code:var x = document.getElementsByClassName('reset'); for (var i=0; i<x.length; i++) { x[i].style.display = 'none' }
Thanks,




Reply With Quote