PopupWindow updated! Supports profiles now.
UPDATE: I didn’t mention this, but there is an index.html file in the plugin’s zip file that demos and explains how to use the plugin.
PopupWindow has been updated yet again!!!!
The big news is that now it supports creating your own profiles that you can call instead of having to pass settings in each link tag. Check it out:
You create a couple of profiles for PopupWindow like so:
var profiles = {
window800: {
height:800,
width:800,
status:1
},
window200: {
height:200,
width:200,
status:1,
resizable:0
}
};
Load them into the plugin:
$(function(){
$(“.popupwindow”).popupwindow(profiles);
});
Then when you want to use this profile, you just call it in the rel attribute like so:
<a href=”http://www.jquery.com” class=”popupwindow” rel=”window200″>Profile Example 2</a>
This is WAY easier then passing in value in the rel attribute like before. Of course you can still do that if you want, but I recommend creating and using your own profiles from now on.
Other updates to the plugin include:
I removed resize as a setting and add the correct setting resizable. This will break backwards compatibility, but in order to get profiles working correctly, it was a must.
I removed example text from this js file and made an index.htm file to house examples, which now pulls the latest jquery library from jquery.com so you can actually run the examples
Go grab the latest code from here.
[...] March 2nd, 2007 UPDATE: Popupwindow now supports profiles. Please read more information on this here. [...]
Tony u need a demo page my man!
@ray,
I wish I could be WordPress doesn’t allow any javascript in a post
I’m hoping that at some point the jquery.com website will host the plugins so that I can have a demo page then.
Until that time, the zip contains an index.html file that demos how to use the plugin.
I don’t understand what you mean when you write:
Load them into the plugin:
$(function(){
$(”.popupwindow”).popupwindow(profiles);
});
Did I need to write this function in the popup.js file. If yes, where I need to put this lines. Thanks
Please download the plugin as there are examples in the zip file to get you started.
I agree with Rey… you need a demo page. Being a web dev you might consider having your own site under your own domain! need I list all the benefits?