5
I need to change H2 to H1 dynamically I thought to use jquery as follows but it doesn’t work:
$("h2").removeAttr("h2").attr('h1');
$("h2").attr('h1');
using classes as selector;
$(".wd-product-list .wd-widget .wd-title").Attr("h1");
Any idea?
I understood that this was the reason that did not work. Following the logic I used there is no simpler way to do this? less code, just a question to increase my knowledge. And did not know the tags you used of jquery [replaceWith]. At first thank you
– hyperpixel
I didn’t know that
jsPerf
, very interesting.– Isac
@hyperpixel I believe that these forms are already framed in the group of simple solutions to this problem, for sure there are others, but it will not change much because the code is already well simplified.
– Mathiasfc
@Isac I met not long ago too, in some response here from the same OS, it’s pretty cool.
– Mathiasfc