I have the following code inside a webpage:
<div id="search_suggest"></div>
Trying to use the following inside a javascript code changes the content inside the div brackets.
var ss = document.getElementById('search_suggest');
ss.innerHTML = 'asdasdasasddasasdasdasdasdasdasdasdasasdasd';
The following code, using Jquery as a selector, doesnt work (I checked, I'm selecting the right element):
var ss =$(".search_suggest")
ss.append( "<p>Test</p>"); #doesnt work
ss.html("<p>Test</p>"); #doesnt work
ss.text("<p>Test</p>"); #doesnt work
I also tried with plain text instead of html. Anyone have any ideas as why one works and the other doesn't? I don't believe I'm doing the tesxt or html wrong.
idselector#change$("#search_suggest")instead of$(".search_suggest")