Sometime we need to perform some operations in variables values in jquery or javascript.
We generally uses:
a = jQuery('input#marks').val();
It will be working fine in all the browsers except ie8.
This type of assignment doesn't works in ie8.
You need to use var before jquery / javascript variable. otherwise ie8 will not let you proceed :
var
for this purpose before the variable name.
for example:
var a ='';
a = jQuery('input#marks').val();
I wasted 3 hours in finding the solution for this problem.
Example 2)
var table_val = jQuery('#restaurant_row'+id).find('#table_name').val();
var qty = jQuery('#restaurant_row'+id).find('#qty').val();
var estimatedTime = jQuery('#restaurant_row'+id).find('#estimated_time').val();
0 Comment(s)