0

I am attempting to create a website where clicking on a word linked to a page will open in a separate window with dimensions I create

I am pretty sure my js is linked correctly to my html, so I am not sure what the problem is...I am new to javascript however is it could possibly be an issue in that line of coding.

this is an example of the beginning html:

<!DOCTYPE html>
<html>
<head>
<script src="https://code.jquery.com/jquery-3.1.0.min.js"></script>
<script type=text/javascript src="script.js">
</script>
</head>
<body>
My name is Carter, and <a href="profile.html" class="profile">this</a> is what I look like.

This is the is have right now:

$('.profile').click(function() {
            window.open($(this).attr('href'),'_blank','PopUp'+randomnumber+',scrollbars=1,menubar=0,resizable=1, width='+width/4+', height='+height+', top=0, left='+width/4+'');
            return false;
        });

The end hope is that I would be able to have a website with multiple links that would open multiple windows, hence why I begun coding and dividing things by class.

0 Answers0