Calling DWR library and JQuery library

1k views Asked by At

I am new to DWR and I need some clarifications in the subject. I have some code that is using DWR engine and I want to implement JQuery events but if I put this header

<script src="//code.jquery.com/jquery-1.10.2.min.js"></script>

above the script to get DWR ready to work

 <script type="text/javascript" src="ajax/core/engine.js"></script>
<script type="text/javascript" src="ajax/core/util.js"></script>

JQuery does not work.

And if I put it below, DWR does not work.

Does anyone have some info that can help me to understand this better?

Thanks in advance.

2

There are 2 answers

4
Elye M. On

Try adding

<script type="text/javascript">
    jQuery.noConflict();
</script>

to your application, sometimes there is conflicts between different libraries, this might solve your problem.

Take a look here for more information.

0
Rohan Suryawanshi On

Add jQuery.noConflict below JQuery libraries, then add DWR libraries.

i.e.

    <script src="//code.jquery.com/jquery-1.10.2.min.js"></script>

    <script type="text/javascript">
        jQuery.noConflict();
    </script>

    <script type="text/javascript" src="ajax/core/engine.js"></script>
    <script type="text/javascript" src="ajax/core/util.js"></script>

Now it should work.