I am using the following code to change the tab color on click
$("ul.tabs").tabs("> .pane");
but it is throwing the error
uncaught exception: cannot call methods on tabs prior to initialization; attempted to call method '> .pane'
Could somebody help me with this what is this error?
Its pretty straight forward as the exception says. Your tabs must be initialized before you can work on them. So initialize them.
function(){
$("ul.tabs").tabs();
}
or simply by using
$("ul.tabs").tabs().tabs($("div.panes > div"), action);
I don't know what do you expect to get using this code, but it's wrong.
You shouldn't pass selector as an attribute for .tabs()
method.
Look at the jQuery UI Tabs API for how to use it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With