Hey Marc it works only once, when you close the alert box and click again on the button it wont show again, please check, the reason behind this after closing the alert it is deleted from DOM, any idea if you want to show an alert multiple times,what should be done?
On Wednesday, February 6, 2013 7:24:12 PM UTC+5:30, Marc A. wrote: > > Something like this : http://jsfiddle.net/P4U7N/2/ > > Le mercredi 6 février 2013 03:46:21 UTC-5, Sanchit Matta a écrit : >> >> Hi Marc >> I am facing the same problem, can you please give an example how to hide >> and make it visible with .show(). >> I am bit bas at it. >> Thanks >> >> On Monday, September 10, 2012 1:18:17 AM UTC+5:30, Marc A. wrote: >>> >>> The .alert() method does the same thing as the data-dismiss attribute, >>> it enables the close button to destroy an alert. What you need is either to >>> add it to the DOM in js when you want to show it or make it invisible with >>> CSS and make it visible with .show(). >>> >>> >>> Le dimanche 9 septembre 2012 13:01:10 UTC-4, benrhere a écrit : >>>> >>>> Hi there, >>>> >>>> I would think that this would be simple, but I haven't been able to >>>> find an example or get this working. I'd like to have an alert in a page, >>>> but not have it display until I call some javascript to have it show. But, >>>> just by having the HTML there, it seems to immediately display the alert, >>>> even without my initializing it: >>>> >>>> >>>> <div id="PostSuccess" class="alert alert-success hide fade in" style=" >>>> width:300px"> >>>> >>>> <button type="button" class="close" data-dismiss="alert">×</ >>>> button> >>>> >>>> <strong>Success!</strong> You were successful. >>>> >>>> </div> >>>> >>>> >>>> >>>> >>>> and in my javascript, in a button click handler I have: >>>> >>>> $( >>>> >>>> "#PostSuccess").alert(); >>>> >>>> >>>> But, the alert is displayed immediately upon page load. Anyway to have >>>> it wait for my triggering it via js? >>>> >>>> -Ben >>>> >>>> >>>> >>>> >>>> >>>> -- You received this message because you are subscribed to the Google Groups "twitter-bootstrap" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
