-2

i have two jquery included in 1 file

<script type="text/javascript" src="<%= SkinPath%>controls/jquery.js"></script>
<script type="text/javascript" src="<%= SkinPath%>controls/jquery-1.7.min.js"></script>

the first one helps to chnge the tab color at run time for the tabs. the second one help in jquery model pop up, but 1 have to hide 1 to work another how rid off this misery. Too much stuck on this issue. Please help me with this.

Even hideing the second one disturb both the tab and model pop up functionality, but i observed for the tab functionality the first one is necessary. Not getting whats the issue.

NoviceToDotNet
  • 10,387
  • 36
  • 112
  • 166
  • 1
    You cannot include jquery twice. It will conflict. Why do you have 2 inclusions? – Darin Dimitrov Dec 07 '12 at 08:55
  • You can do it by using `jQuery.noConflict()`. Example: http://stackoverflow.com/questions/21735713/including-more-than-one-jquery-versions/21736074#21736074 – martynas Mar 16 '14 at 13:41

3 Answers3

2

From my understanding you are trying to use jQuery UI widgets like tabs and model dialog

So you have to use jQuery core followed by jQuery UI. Its not a matter that minified or not, but jQuery UI is dependent on jQuery Core!

So use below. Not sure what are the names of your core and ui files.

<script type="text/javascript" src="<%= SkinPath%>controls/jquery.js"></script>
<script type="text/javascript" src="<%= SkinPath%>controls/jquery-ui.js"></script
Murali Murugesan
  • 22,423
  • 17
  • 73
  • 120
0

You need to user jquery.noConflict() : more info here : http://api.jquery.com/jQuery.noConflict/

This other answer on StackOverflow show you in detail how to do this : https://stackoverflow.com/a/528251/1606729

EDIT: but as the others pointed out you should not have to use multiple jquery except in very rare cases. Why do you need the 1.7 version if you already have another one?

Community
  • 1
  • 1
koopajah
  • 23,792
  • 9
  • 78
  • 104
0

You have to use only one JQuery (jQuery core), try using the lastest version and modify your code to work with it.

luisZavaleta
  • 1,160
  • 11
  • 21