Closed GoogleCodeExporter closed 9 years ago
[deleted comment]
Could you try adding the following line in your script :
jQuery.noConflict();
GFlot is using "jQuery" and not "$" to call flot. If I understand correctly the
jQuery documentation, that should be enough
(http://docs.jquery.com/Using_jQuery_with_Other_Libraries#Overriding_the_.24-fun
ction).
Original comment by nmr.morel
on 11 Apr 2012 at 9:22
Ah nevermind, the jquery lib isn't directly loaded so the call to noConflict()
should have no effect. For now, you can load yourself the library and call
noConflict() after. See the usage wiki page for that. I'll see to add
something to automatically do it.
Original comment by nmr.morel
on 11 Apr 2012 at 9:27
I decided to do just that for now, thanks for the quick response.
Original comment by Diego.N...@gmail.com
on 12 Apr 2012 at 2:53
I did a few tests. Here is the simplest solution with current gflot version.
Add those lines to your *.gwt.xml :
<replace-with class="ca.nanometrics.gflot.client.resources.ExternalLoader">
<when-type-is class="ca.nanometrics.gflot.client.resources.JQueryLoader" />
</replace-with>
Then on your html page, add jquery js + noConflict like explained on jQuery api
:
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
$.noConflict();
// Code that uses other library's $ can follow here.
</script>
I added a *.gwt.xml file doing all this. With next version, you will just have
to add
<inherits name="ca.nanometrics.gflot.GFlotJQueryNoConflict" />
instead of
<inherits name="ca.nanometrics.gflot.GFlot" />
Original comment by nmr.morel
on 15 Apr 2012 at 4:10
Original comment by nmr.morel
on 22 Apr 2012 at 7:19
Original comment by nmr.morel
on 22 Apr 2012 at 7:19
Original comment by nmr.morel
on 16 Jun 2012 at 4:32
Original issue reported on code.google.com by
Diego.N...@gmail.com
on 11 Apr 2012 at 3:47