I’m having a hard time trying to call functions from inside other functions:
$('#edit_wgt_contact_form').modal();
//Widgets creation
function createWidget(type){
$('#edit_wgt_contact_form').modal();
}
The first call to “$(‘#edit_wgt_contact_form’).modal()” works as expected but the one inside the function returns an error “$(“#edit_wgt_contact_form”).modal is not a function”.
(of course the createWidget function is being called in other part of the script).
This is just an example, I’m having the same kind of problem in different parts of my application and I just can’t figure out what’s going on.
Can someone please help?
Thanks in advance!
I found out this is due to the double inclusion of JQuery. The page from which this code comes from has an ajax call that loads another page and it includes JQuery once more.
This is a known bug as documented here: http://bugs.jquery.com/ticket/12136
Thanks for everybody that contributed!