Hi, i have a repeater on home page and when cursor hover over the image of item it shows the tooltip like “image.png” So i want replace tooltip with title field text from my collection So next time when user hovers on the repeater’s image it will show him the title field text.
how to do this using code
Please! suggest me something
Hi Saurabh
You need to use the property tooltip to change it, but you need to use the repeated selector ( $item ).
$item("#myImage").tooltip = "Tooltip text";
Ahmad
thanks!! it worked
You’re welcome
I did this and it doesn’t work. I have been unable to get it to work. It keeps just showing the name of the picture instead of the tool tip I assign
Hi @ahmadnasriya would like to do the same on a page with 24 images displayed with a repeater. Can you advise how to do this, where to insert the code, etc. Thanks!
You need to put the code in my answer in the repeater’s onItemReady( ) event handler, and then use the repeater’s selector to access the tooltip of the repeated image element and assign it anything from the repeater’s itemData , or a blank string to remove it.
I actually did get this. I ended up missing a period somewhere in my code. Oops. It works.