Porsche_maniak
Active Member
Hi !
I transfer image title (the image is in iframe) to tooltip without problem.
But the problem is when the iframe is refreshed the image title changes and the tooltip doesn't.That's why i found the live function which is used for that ?
To be clearer for you check out the code :
So when the chtitle!=rtitle and refresh the iframe only (not the page) the alert(0) doesn't show.
What's the problem ?
Edit : @im4aLL - When the iframe refreshes the image title changes too...So i need to transfer the new image title to the iframe title attribute (in the case i use alert(0) to test only).
I transfer image title (the image is in iframe) to tooltip without problem.
But the problem is when the iframe is refreshed the image title changes and the tooltip doesn't.That's why i found the live function which is used for that ?
To be clearer for you check out the code :
Code:
[B]//replacing the iframe title attribute with the image title (which is actually in the iframe)[/B]
$("#onlineimg").attr("title",$("#onlineimg").contents().find("img").attr("title"));
[B]//image attr title[/B]
var chtitle = $("#onlineimg").contents().find("img").attr("title");
[B]// iframe attr title[/B]
var rtitle = $("#onlineimg").attr("title");
[B]//tooltip load[/B]
$("[title]").simpletooltip();
[B]//if iframe title diff than img title alert(0)[/B]
$("#onlineimg").live("mouseover",function(){if(chtitle!=rtitle){alert(0);}});
[B]// the iframe[/B]
<iframe title="" allowTransparency=true scrolling=no frameborder=0 width=45 height=10 src=online.html id=onlineimg></iframe>
So when the chtitle!=rtitle and refresh the iframe only (not the page) the alert(0) doesn't show.
What's the problem ?
Edit : @im4aLL - When the iframe refreshes the image title changes too...So i need to transfer the new image title to the iframe title attribute (in the case i use alert(0) to test only).
Last edited: