0

Please can some one explain me whether I can use both of default and jQuery in single rails application ??? Because I currently working with rails project which developed using default JavaScript file but I need to use jQuery JavaScript file as well so is it possible.

SL_User
  • 1,934
  • 5
  • 24
  • 45

2 Answers2

1

nope the problem arises when you use multiple plugins on the same page or you use more than one JS liberaries on the same page like jquery and dojo for that you have to use noConflict but if you want to use javasctipt along with jquery on the same page that is not a problem.

how to use jquery.noConflict property

Community
  • 1
  • 1
Rafay
  • 30,950
  • 5
  • 68
  • 101
1

Default library in 2.3.8 is prototype and that's conflicting when you are using ....

Just add the library in the below format :

<head>          
    <script type="text/javascript" src="/obp/js/prototype.js"></script>
    <script type="text/javascript" src="/obp/js/jquery.js"></script>
    <script type="text/javascript">
        jQuery.noConflict();
        var $j = jQuery;
    </script>
</head>
Vik
  • 5,931
  • 3
  • 31
  • 38