1
Hello, look at these lines of code:
<div id="divn4" align="center"><i style="">Nunca, nunca enviamos span.</i></div>
So, if I wanted to reference the italic there, to apply some function to it, without having to put an id, or class, in Jquery, how can I do it? I think of something like:
$("#divn4[i]").text("teste");
In short, it would be something like in CSS, where you can create a selector not necessarily using an ID or Class..
Perfect, I didn’t have this idea that it was in the same way the specificity applied there in CSS, it was also in javascript(jquery), grateful partner, even more.
– Ale
@Alexandrec.Caus The jQuery (and pure JS selectors with
querySelector
andquerySelectorAll
) are the same as the CSS, save one or other extension.– bfavaretto