My favorites | Sign in
Project Home Downloads Issues
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 23: jQuery click events on AJAX content
2 people starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  ----
Closed:  Jun 2008


 
Reported by toddtre...@gmail.com, Jun 3, 2008
What steps will reproduce the problem?
1. Define a jQuery click event function.
2. Load content into modal with AJAX call.
3. jQuery click events are not called from AJAX loaded nyroModal content.

What is the expected output? What do you see instead?

I would like the "Add Nickname" and "Add Location" calls to work in the modal as they do on the 
following page.

http://itg.midmich.edu/directory/

Do I have to put this content in an iFrame?   I am calling other forms fine, but any javascript 
functions that are included in the <head> of my page can't be called by an AJAX called 
nyroModal.

What version of the product are you using? On what operating system?
nyroModal 1.2.6 on Mac OS X 10.5.3.

Please provide any additional information below.

 
Jun 3, 2008
Project Member #1 nyro...@gmail.com
As quick fix, you can simply put your javascript code in the body part of your page
and it will work.
If you want use an ajax request with a targeting content, put this javascript in the
content targetted.

NyroModal doesn't eval the script in the head part of the page loaded by ajax.
I did that because of all the javascript included in the head part.
I didn't want to reload the jQuery library for example.

Here is how I can fix it:
- If it's a targeted content, only the script in the element targeted will be evaluate
- If it's not, only the inline script (even in the head part) will be evaluated. All
the script with a src attribute will be simply ignored.

What do you think?
Status: Accepted
Jun 3, 2008
#2 toddtre...@gmail.com
Adding the scripts to the body of the content worked perfectly!  Thanks for the help and for the great plugin.
Jun 12, 2008
Project Member #3 nyro...@gmail.com
toddtreece, I just released the version 1.2.7 which will allow you to let your code
in the head part of your page.
Be sure to read the usage part of the documentation to understand exactly which
scripts will be included.
Status: Fixed

Powered by Google Project Hosting