Skip to content
This repository has been archived by the owner on Oct 30, 2022. It is now read-only.

Adding event to after callbacks #33

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

abreckner
Copy link

Hello,
I came across your excellent jQuery plugin, and while it was really cool, there were a couple of things I needed to tweak in order to get it working on my site. I figured other people might want these changes too so I created a fork and a pull request.

Essentially, what I wanted to do was to load the modal with the results of an AJAX call. In order to do that I had to have access to the event object for the callbacks. I also had to remove the href == idConc requirement (not 100% sure it is necessary).

I also noticed that on my mobile site that setting overflow to 'auto' on close was not setting things back to what they were so I changed it to 'initial' instead.

Thanks

Anthony Breckner

Also removed the requirement that href == idConc and set overflow to
initial on close.
Also returning the object for daisy chaining and adding the openModal
and closeModal methods onto the returned object so we can control the
modal manually.
@@ -9,6 +9,7 @@
(function ($) {

$.fn.animatedModal = function(options) {
var me = this;
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

holding variable so we can return "this" at the end as is customary (with added openModal and closeModal methods).

@abreckner
Copy link
Author

Ok, I will have a look. Thanks!

@abreckner
Copy link
Author

hello,
I fixed the event is not defined error for Firefox.

Thanks

Tony

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants