How To Get The Value Of Colspan
I have tried different jQuery approaches: var num = $(this).attr('colspan').text(); var num = $(this).attr('colspan').val(); var num = $(this).('td[colspan]').val(); var num = $(th
Solution 1:
Use prop
to get the value set for the attribute/property, this will reflect any changes made to the property with JS after the page load:
$(this).prop("colSpan");
JS Fiddle:http://jsfiddle.net/9u8L2/1
Post a Comment for "How To Get The Value Of Colspan"