javascript - window.location.href navigates out of my website -
okay i'm having tough situation. i'm using free html template. far have been able following:
when user clicks thumbnail. video play should.
all had add direct raw video file href of image.
<a class="thumbnail" href="video_link.mp4"><img src="http://i.imgur.com/kwyihw8.jpg" /></a> then came accross problem raw link display on bottom left of browser.
i fixed adding onclick event form function.
<a class="thumbnail" href="#" onclick="video();"><img src="http://i.imgur.com/kwyihw8.jpg"/></a> the function is:
function video() {window.location.href = 'video_link_here.mp4'} well turns out when click image navigates whole page link.
i need know how can make play without navigating out of website in first picture , importantly not showing raw video link.
try using jquery load func, load image in specific div
$("#div1").load("http://i.imgur.com/kwyihw8.jpg") 
Comments
Post a Comment