Im trying to create a popupbox with text on mouseover. My problem is that I dont have access to the html, and I cant upload javascript- I can however do css and write Javascript.
Most example I find either requires you to change the cssclasses, or upload a Javascript. Since I cant link in internal script, that fails.
Can I do this with Javascript without the need to upload a scriptfile?
hmtl example, where the span class is the one I need to target:
<a href="/products/Microsoft/All-in-One-Media-Keyboard-with-TouchPad-German-?prodid=1676284">All-in-One Media Keyboard with TouchPad German <span class="labelextension N2">Bulk</span> </a>
This is a VERY crude example on how to do what you described:
$('.labelextension')
) popup = document.createElement(...)
) ...appendChild(popup)
) popup.classList.add('tooltip')
and .tooltip {display:none} .labelextension:hover .tooltip {display : inline;}
) A rather crummy JSFiddle here: http://jsfiddle.net/kcdagqdn/
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.