https://github.com/rvflash/jquery-open
Enable various method to open links, as in iframe, in popup or in current window of course. Can manage all HTML tags with jQuery data "url" or basically with "a" tag.
https://github.com/rvflash/jquery-open
Last synced: 8 months ago
JSON representation
Enable various method to open links, as in iframe, in popup or in current window of course. Can manage all HTML tags with jQuery data "url" or basically with "a" tag.
- Host: GitHub
- URL: https://github.com/rvflash/jquery-open
- Owner: rvflash
- Created: 2012-10-01T22:28:47.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2014-06-02T10:05:41.000Z (over 11 years ago)
- Last Synced: 2025-01-28T16:16:36.295Z (10 months ago)
- Language: JavaScript
- Size: 315 KB
- Stars: 2
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
jQuery-Open
===========
## New in 1.3 ##
- Extend event object with "currentTab" with DOM element of the current opened tab in "browser".
## New in 1.2 ##
- Now receive as first parameters on callback the event, with dedicated parameter named "currentHref" with URL decoded called.
## New in 1.1 ##
- Now only works by event delegation.
- Add event on load, on view for ajax and iframe mode.
- Enable to close iframe or ajax box by clicking outside it.
- Add closure tag on top of iframe or ajax box.
- Manage maximum number of tab also from ajax box.
- Convert # as ? in url for ajax mode
=======
Enable various methods to open links:
- In iframe
- In popup
- In current window of course
- With Ajax call
Can manage all HTML tags with jQuery data "url", data "erl" (link encoded with rot13 method) or basically with "a" tag.
You can complete current url dynamically with data "arg" and with an unique identifier named "i", generated by this plugin.
Various options, like autoading of the first element are available, or the toggle display on click for one element loaded, etc.
See settings for more informations.
## Examples ##
You can also specify 3 type of opening. By default "self", open it in current view, "popup" in new window and "iframe" enable to show url in iframe with loading message:
$.open("span.a");
And, you can specify various properties to extend common behaviors, here for example we open the first element on load:
$.open("span.a", {type: 'iframe', autoload: true});
Attach events when the element exits of the current view. The DOM element has been passed as first parameter:
$.open("a, span.a", {
onExit : function (e){ console.log('Bye' + e.currentHref); },
});
And if you want to change the container of the delegation, this one :
$.open('.a, span.a', {container: '.myContainer'});
You can use data "erl" to store URL encoded with Rot13 transformation. Perform to obfuscate some links.
Finally you can overload common behavior of a list by adding classname on each element (self, blank or iframe).