Skip to content
WJunction - Webmaster Forum

jquery live function ?

Status
Not open for further replies.
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 :
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:

2 comments

I actually didn't understand what you want to .... Please give a demo page where i can see the problem....

else .....

You may need setInterval/setTimeOut function to Reload. Obviously you need to use Ajax/load function on it..
 
Status
Not open for further replies.

About the author

Porsche_maniak
Active Member · Joined
Auto racing,Porsche,Web Development
283
Messages
0
Reactions
16
Points

Advertise on WJunction

Reach 1000's of webmasters, hosts & affiliates. Banner & sponsored-thread slots available.

Contact us
Back
Top Bottom