2 Replies - 641 Views - Last Post: 07 December 2012 - 07:09 AM

#1 maxmitch  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 07-December 12

Jquery event wont work on sources/links?

Posted 07 December 2012 - 07:00 AM

Hi,
I want that when you hover over the part that is inside the iframe the animation will work. Currently nothing happens. I have made the width of the div on my website slightly wider so you can see what the mouse over event should do.

http://tragicclothin.../deleteeee.html



<div id="box3" onmouseout="$('#box3').stop().animate({boxShadow:
'10px 10px 15px', top: 0}, 'fast')" onmousemove="$('#box3')
.stop().animate({boxShadow: '3px 3px 3px', top: 3}, 'fast')" 
style="top: 0px; width: 710px; box-shadow: 10px 10px 15px 0px 
rgb(102, 102, 102);"> <iframe width="700" height="525" id="SHADDOW" 
src="http://www.youtube.com/embed/LRo-L9zYf-M" frameborder="0" 
allowfullscreen="allowfullscreen"></iframe> 


Is This A Good Question/Topic? 0
  • +

Replies To: Jquery event wont work on sources/links?

#2 maxmitch  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 07-December 12

Re: Jquery event wont work on sources/links?

Posted 07 December 2012 - 07:07 AM

I have also tried using css and z-index to put another div in front of the video with the action but that didn't work.
HTML:
<div id="box3" onmouseout="$('#box3').stop().animate({boxShadow: '10px 10px 15px', top: 0}, 'fast')" 
onmousemove="$('#box3').stop().animate({boxShadow: '3px 3px 3px', top: 3}, 'fast')" style="top: 0px;
width: 710px;
box-shadow: 10px 10px 15px 0px rgb(102, 102, 102);">
<iframe width="700" height="525" id="under" src="http://www.youtube.com/embed/LRo-L9zYf-M" frameborder="0" allowfullscreen="allowfullscreen"></iframe>
</div> 


CSS:
#under {
    width: 100%;
    height: 100%;
    position: relative;
}

#box3 {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

#box3 {
    z-index: 10;
}

Was This Post Helpful? 0
  • +
  • -

#3 Dormilich  Icon User is online

  • 痛覚残留
  • member icon

Reputation: 3520
  • View blog
  • Posts: 10,160
  • Joined: 08-June 10

Re: Jquery event wont work on sources/links?

Posted 07 December 2012 - 07:09 AM

the problem with the iframe is that it is a completely new document, so the event (when triggered inside the frame) does not reach the outer document (where the handler is).
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1