Problems while using jQuery

  • I have created a widget which uses sysinfo API and all relevant API calls are stored in separate js file, so I include it into main html with:

    @[script type="text/javascript" src="hellowrt.js"][/script]@

    (sorry for square brackets, post filtering in this forum seems to be over-sensitive)

    Script itself uses plain old document.getElementById('element')[removed] calls to update corresponding html placeholders and it generally works nicely together.

    Now, the problem I have is that as soon as I include jQuery to the JS stack:

    @[script type="text/javascript" src="jquery-1.4.2.min.js">[/script>
    [script type="text/javascript" src="hellowrt.js">[/script>@

    suddenly all my API calls just stop working and I don't get responses from sysinfo API. I don't modify anything within hellowrt.js, just adding jquery-1.4.2.js file renders hellowrt.js non-functional.

    Perhaps there's some sort of conflict between jQuery and sysinfo API? Additionally, is there any way to debug QtWRT apps, ie. see JS errors as they happen?

  • Note to self, again (via maemo-developers mailing list): "":

    jQuery.noConflict() does the trick.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.