what is the equivalent of the JavaScript window.open("new_window.html") in jQuery?

I am trying to convert JavaScript code into jQuery (for learning purposes) but I can't seem to find anything about it.
Thanks.
Corinne_09Asked:
Who is Participating?
 
Corinne_09Connect With a Mentor Author Commented:
Thanks for your help guys. I am just a beginner so this is a little overwhelming for me, but I have been doing my own searching.
I found this website and it has a simple implementation: http://yensdesign.com/tutorials/popupjquery/

I looked at your suggestions and they are amazing. If I have time I'll try them out as well. Thanks!
0
 
Seven priceFull StackCommented:

If your using jQuery, you might want to check out a plugin called PopUpWindow I wrote that makes writing popupwindows very easy. It even supports profiles. Check it out and any comments or suggestions are welcomed.
http://rip747.wordpress.com/2007/03/02/the-return-of-popupwindow-jquery-plugin/ 
0
 
Corinne_09Author Commented:
Ok, that doesn't really help. I am new to all this and I'm having trouble understanding what is going on.
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
hard2u2001Connect With a Mentor Commented:
first thing is that jQuery is not different from javascript. It is a framework for javascript. means it just provide some easy ways for some regularly used functions and wrapper functions for javascript native functions.
Basically used for unobtrusive HTML and Javascript.

Now...
See the code below for ur purpose solving
//Suppose u have links in your page which pop-up windows to other sites like
(HTML Code)
 
<a href="new_window.html" rel="pop-up">new_window</a>
 
//notice here rel="pop-up". That is the key.
 
//javascript code
 
<script>
$(document).ready( function() {
   
    $('a[rel="pop-up"]').click( function() {
        window.open( $(this).attr('href') );
        return false;
    });
   
});
</script>

Open in new window

0
 
Corinne_09Author Commented:
Thanks. I understand that part. But now how do I make the popup look nice? I want it to be centered, fade in slowly and be a certain width and height.
0
 
Seven priceFull StackCommented:

<!-- Begin
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=1,resizable=1,width=400,height=400');");
}
// End -->

Open in new window

0
 
hard2u2001Commented:
See this link
Its the best one till now whatever I have used.

http://fancy.klade.lv/examplehttp://fancy.klade.lv/example
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.