• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Scott Selikoff
Bartenders:
  • Piet Souris
  • Jj Roberts
  • fred rosenberger

jQuery click function and ajaxcomplete not working.

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?

 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic