File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes jQuery click function and ajaxcomplete not working. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "jQuery click function and ajaxcomplete not working." Watch "jQuery click function and ajaxcomplete not working." New topic
Author

jQuery click function and ajaxcomplete not working.

Javan Roberts
Greenhorn

Joined: May 23, 2012
Posts: 4
Hi I would appreciate any help with this little issue I'm having.. I'm trying to use jQuery ajax along side twitter bootstrap and I cannot get the modal to function properly. When I remove the $("#process").modal("show"); from the script the modal will still show, when I leave the $("#process").modal("show"); in, it will show for a split second and then disappear. I also have $("#process").modal("hide"); on a document ajaxcomplete function, yet it wont hide, but the ajaxcomplete alert is firing. What am I doing wrong?

Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
id is singular, you can not have two or more items with the same id.

And I do not see you cancelling the click action.

Eric
Javan Roberts
Greenhorn

Joined: May 23, 2012
Posts: 4
Ah ok, thank you, that would explain why I couldn't get the second button to fire. What would be the correct syntax to target each button if I change their id's to id="dpp_button-1" and id="dpp_button-2". I've tried this:
Also, It seems like the data-toggle="modal" in the anchor tag was the culprit, it looks like they were canceling each other out.

Activate a modal without writing JavaScript. Set data-toggle="modal" on a controller element, like a button, along with a data-target="#foo" or href="#foo" to target a specific modal to toggle.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: jQuery click function and ajaxcomplete not working.