Hello,

I am trying to integrate a jQuery component with pyjs. My code looks like 
this:

from __pyjamas__ import JS

...

class CallDetails(VerticalPanel):


    def __init__(self, avatar_image, call_from, start_date, duration,
 own_style = 'activity-call-details'):
        VerticalPanel.__init__(self)
        ... (initialization of my vertical panel, with lots of components, 
and a div with id #aa10)
        self.final_setup()


    def final_setup(self):
        JS("""jQuery("#aa10").select2({tags:["red", "green", "blue"]});""")

The javascript console is telling me: 

Uncaught ReferenceError: jQuery is not defined

But I have included jQuery. This is my Activity.html:

<html>
<head>
<script src="jquery-1.7.2.min.js"></script>
<link rel="stylesheet" href="Portal.css">
<link rel="stylesheet" href="select2.css" />
<script src="select2.js"></script>
<title>Activity - Wavilon.com</title>
<meta name="pygwt:module" content="Activity">
</head>
<body>
<script type="text/javascript" src="bootstrap.js"></script>
<iframe id="__pygwt_historyFrame" style="display:none;"></iframe>
</body>
</html>

According to Chrome Network inspector, both jquery and select2 are loading. 
What can I do to use jQuery from within pyjamas?

Thanks,
Daniel

Reply via email to