I’m wondering if I can get your help with Jquery. Note, I cannot modify any of the html in this code because it is dynamically generated with separate widgets in wordpress.
I have a tag in a tag cloud like this with a class name “tag-link-169”
<a style="font-size: 1.3em; color: rgb(30, 37, 130);" title="1 topic" class="tag-link-169" href="http://blahblahblah.com/tag/poll-2/">poll</a>
It’s parent class is <div class="tagcloud">
I want to take that particular tag “tag-link-169” and remove it from the tag cloud and put it before the search box, which has a class “search_form”, and also be able to add an html text in front of the tag, “click this tag to see Polls”
<form action="http://blahblah.com/" class="search_form" method="get">
<p>
<input type="text" onblur="if (this.value == '') {this.value = 'To search, type and hit enter';}" onfocus="if (this.value == 'To search, type and hit enter') {this.value = '';}" id="s" name="s" value="To search, type and hit enter" class="text_input">
<input type="hidden" value="Search" id="searchsubmit">
</p>
</form>
Can anyone assist?
You’d need to select the element, then use
insertBeforeto put it in the right place. You could then usebeforeto insert the text: