1

I have one <div> which has a property display:none by default if some message i want to show to user then i am using this div. I dont want to allow user to do any action once this div displayed.

There is a lots of way user can do that div display:none so i want to trigger function on display:none of this <div>

But i dont know how to get event so that i can come to know about display property of the div

Swap L
  • 698
  • 3
  • 12
  • 27
  • what is your problem, your are just saying `div` `display:none`, I'm not getting, can someone explain? – Mritunjay Aug 11 '14 at 05:03
  • i want to trigger one function if div diplay:none proprty is changed – Swap L Aug 11 '14 at 05:05
  • see this example : http://api.jquery.com/visible-selector/ – xkeshav Aug 11 '14 at 05:05
  • There is no event for this. You can check the `display` property of the element in your functions. Something like `if ($('#elem').is(':hidden')) { }` – Ram Aug 11 '14 at 05:06
  • @Mritunjay javascript event on css style change from block to none – Swap L Aug 11 '14 at 05:06
  • 1
    Another related question: [Event detect when css property changed using Jquery](http://stackoverflow.com/questions/1397251/event-detect-when-css-property-changed-using-jquery) – Ram Aug 11 '14 at 05:13
  • Try this code `if (($("#Div").css("display"))=="block") { }` Hope this may useful – Suganth G Aug 11 '14 at 05:27

0 Answers0