Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
139
rated 0 times [  145] [ 6]  / answers: 1 / hits: 20693  / 12 Years ago, tue, december 11, 2012, 12:00:00

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?


More From » jquery

 Answers
15

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);

[#81490] Monday, December 10, 2012, 12 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
juancarlos

Total Points: 580
Total Questions: 105
Total Answers: 103

Location: Grenada
Member since Sun, Dec 20, 2020
4 Years ago
juancarlos questions
Wed, Mar 24, 21, 00:00, 3 Years ago
Wed, Jul 15, 20, 00:00, 4 Years ago
Wed, Jan 8, 20, 00:00, 5 Years ago
Mon, May 20, 19, 00:00, 5 Years ago
;