DHTMLX Touch will not run with jQuery

Hi all,

I have to run TouchLib with another library that uses jQuery.

When I just include all .js Files, the other lib simply does not work (no Error messages).

I followed an old hint from Stanislav: replace all $$ occurences in touch.js with dhx.ui.get (just 3x times found).

Then the other library worked again, but a simple “dhx.ui(…).show()” leads to an “dhx undefined” error.

I tried a few things like $.noConflict(); from jQuery, but no chance.

IMPORTANT: it is not a “sequential run” where you could switch the “$” to one scope and then to the other, like jQuery advices. It is a callback-framework from a RFID-cardreader, ie. I can get a call from that library at any time.

Please help, Thx, Pit.

Latest version of the lib, doesn’t use $$ for any internal operation, so it must not conflict with jQuery. ( the samples may use this construction a lot, but in your own code you can use dhx.ui.get )

Be sure to use latest version from dhtmlx.com ( at this moment it is 1.0rc )

If issue still occurs - can you send any sample or demo link, where issue occurs?

Thanks for the reply.

As I worked on isolating this problem and made a small package for you, I observed the following:

It works under Iron & Safari!
It still does not work under Firefox: you have to either outcomment touchui.js or replace the $$ there (but then dhx is unknown)

So - it is a strange combination that is not working, but definitely an interference with the touchlib or the $$.

The code example is under tracer24.sites.djangoeurope.com/LoggClient.html
But the effect can just be seen if you have this card reader. In his case the Iron will pop up a nice Touch - Window and the FireFox will do nothing.

Try to do the next, alter the lib loading code as

and later, in code of sample, instead of $$ use dhx.ui.get ( you need not modify anything in touchui.js - only in your code, in LoggClient.html )