0
 <div class="learnmore">
    <a href="https://linktovideo"    target="_self"
 onclick="window.open('https://linktovideo','_self','width=600,height=600');
 return false;" class="learn-btn">
     Watch Video
     </a> 
 </div>

Im still learning jQuery, but currently this is still opening the link in a new window. I thought applying the "_top" attribute opens the window on the current page. Is target_top not compatible with jQuery or am I over thinking this, thank you stack for any help!

Ben Casalino
  • 2,262
  • 5
  • 20
  • 28
  • 1
    Please post some of your code. – Rax Weber Oct 20 '16 at 15:21
  • sorry i just added it, please dont downvote I am really trying to learn this! – Ben Casalino Oct 20 '16 at 15:23
  • 1
    The attribute `targt="_top"` has no connection to '_top` in method `window.open()`. In the second one, it is an object variable for Javascript. – Reporter Oct 20 '16 at 15:27
  • ah okay I thought that might be the case, I just changed it to target="_self", so there is no point in having '_self' in the jquery section because window.open() is doing the same thing? – Ben Casalino Oct 20 '16 at 15:30

1 Answers1

0

Is there a specific reason you're trying to use jquery or javascript for this task? Simple html code will get what you want I believe.

<div class="learnmore">
    <a href="https://d25ixnv6uinqzi.cloudfront.net/year3/uotw74.3.mp4"  target="_self" class="learn-btn">
     Watch Video
     </a> 
 </div>
UltrasoundJelly
  • 1,845
  • 2
  • 18
  • 32