Setting variable to true on click - Doesn't seem to work
I ha开发者_JS百科ve a page with 2 simple tabs. The tabs are showing if disable_function = false.
At the end of the page I have a simple trigger which I want to set the variable disable_function = true so that the tabs won't work - when ever the trigger is ON.
I tried few ways but it didn't seem to work.
Here is a fiddle if you want to have a look of the code: http://jsfiddle.net/db7tK/
Thanks in advance.
you have disable_function defined in the scope of document.ready. not as a global. move it out of 'jQuery(document).ready(function(){'
EDIT:
<script>
var disable_function = false;
jQuery(document).ready(function(){....
精彩评论