flowchart is not a function - $j = jQuery.noConflict()
J-Setzer opened this issue · 1 comments
The framework I'm using uses jQuery's noConflict mode (see https://api.jquery.com/jquery.noconflict/) to avoid problems with other libraries:
$j = jQuery.noConflict();
So my code always looks like $j('#selector')
instead of $('#selector')
The jquery.flowchart lib uses $
. After including the script, I am not able to call the flowchart() function on my target element:
<div id="statemachine" data-id="1"></div>
the script gets loaded dynamically, and this does work.
$j.getScript("resources/Jquery.flowchart/jquery.flowchart.js", function (data, textStatus, jqxhr) {
console.log("jquery.flowchart.js loaded!");
var e = $j('#statemachine');
e.flowchart({
data: getData()
});
});
The script gets loaded, and element e
is defined. This is the console output:
Can someone please help me to get jquery.flowchart running in noConflict mode or give me a hint what I'm doing wrong! Thanks a lot!
Regards,
Jan
It should work now. Sorry for the delay!