javascript - This code cant find the div with a specific id -
If you try this code here:
I try Find out if I do not know if I find a divas with ID "Test" and I can make it. The problem is that if I call this function multiple times, it makes div all the time:
var divClasses = $ ('# test'); If (divClasses.length == 0) {divClasses = $ ('& lt; div / & gt;', {id: "test"}). Annex ('body'); Console.log ('unusual!'); }
How does it come?
Your keyboard must produce different characters than expected, either your '< / Code> or
#
is incorrect.
You can see the difference between your '#test'
encoduriconant ('# test') ->
and a #test
is typed into an English keyboard
encodeurIComponent ('% E2% 80% AA% 23 test '#test') - & gt; "% 23 test"
I think this is the starting bid, maybe.
Comments
Post a Comment