0

I am using the following external jquery files in my default.aspx page.

 <script type="text/javascript" src="Scripts/jquery-1.2.6.min.js"></script>
    <script type="text/javascript" src="Scripts/jquery-ui-personalized-1.5.2.packed.js">      </script>
    <script type="text/javascript" src="Scripts/DefaultTab.js"></script>
    <script type="text/javascript" src="TooltipScript/jquery.js"></script>
    <script type="text/javascript" src="TooltipScript/easyTooltip.js"></script>
    <script type="text/javascript" src="Scripts/Validation.js"></script>

The first three scripts i have used for tabs. The next two are used for the tooltip plugin. The last script is used for performing validation on my default.aspx page. However my problem is that when i remove tooltip js from the page , then my tab works fine.But as soon as i include them again , tabs dont work. What could be the problem , what is the best way to refer to external js files. How should these js files be ordered inorder for all of them to work. Any help is much appreciated. Thanks

1
  • 1
    <script type="text/javascript" src="TooltipScript/jquery.js"></script> is this same as <script type="text/javascript" src="Scripts/jquery-1.2.6.min.js"></script> Commented Mar 3, 2012 at 6:47

2 Answers 2

2

You are including jQuery twice. jQuery creates an an object that all plugins are extensions of. So after your first few plugins load, you over write the jQuery object loading it again, and the plugins previously loaded are no longer there

Sign up to request clarification or add additional context in comments.

4 Comments

so how should i do it ,,, could you suggest me as m relatively new to jquery.
always load jquery before all jQuery plugins and dependent code
,,,, sorry but i am not exactly understanding the issue here ,,, how should i use them properly ,,, thanks for your interest
ya got it thanks a lot ,,, i understood it now.... i should refer to the jquery library only once right??? thanks.
2

you are referring jQuery library twice, just use the jQuery reference at the top. if you use it again after adding some plugins, it will remove already registered plugins.

<script type="text/javascript" src="Scripts/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="Scripts/jquery-ui-personalized-1.5.2.packed.js">      </script>
<script type="text/javascript" src="Scripts/DefaultTab.js"></script>
<script type="text/javascript" src="TooltipScript/easyTooltip.js"></script>
<script type="text/javascript" src="Scripts/Validation.js"></script>

3 Comments

,, which one is the jquery refernce ,,, so that means i only need to refer to it once and after that just use the plugins ,,, is that what you meant..Thanks
yes. you can use my order in the answer.Scripts/jquery-1.7.1.min.js may be replace with Scripts/jquery-1.2.6.min.js or Scripts/jquery.js but it is better to download latest version and refer to it.
,,, thanks a lot ,,, i understood it ,,,, one final question ,,, i should only refer to jquery library once and then use all my plugins right??? and from where i can download latest version...thanks mate.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.