Menu
Hello All:
I am using mootool zebra table with two sets of script inside one js file. How do i call the function using if conditions. Both functions cannot be run at the same time.
If table class=”zbra-table” use one function and then if table class=”zbra-table rowspan” use only another function.
Below is my code, please point out what I did wrong.
[code=html]
window.addEvent(‘domready’, function() {
if(‘table’.hasClass(‘rowspan’)) {
var zebraTables = new ZebraTable(‘rowspan’);
}
else {
var zebraTables = new ZebraTable(‘zbra-table’);
}
});