Reputation: 21
How do you change a global-variable inside a jquery function. If I use this code below it will display "0" and not "15".
<script type>
theValue=0;
$(document).ready(function(){
theValue=15;
});
</script>
<script type="text/javascript">
document.write(theValue)
</script>
Upvotes: 1
Views: 2774