two jquery doesnt work
i have two jquery(can increase), one of them masterpage and the other is in contentpage... first i added contentpage query(it is an horizontal accordion menu) and it worked perfectly then i need second one (to get collapsible panel title position) in masterpage... but after added second, both of them didnt work... what is the problem exactly...
samples code
this is first added to make horizontal accordion menu in my contentpage :
<script src="jquery.zaccordion.js" type="text/javascript"></script>
<script src="jquery.easing.1.3.js" type="text/javascript"></script>
<script src="jquery-1.4.2.min.js" type="text/javascript"></script>
<script src="jquery.zaccordion.min.js" type="text/javascript"></script>
/*In MasterPage to Horizontal accordion*/
<script src="http://code.jquery.com/jquery-1.5.js" type="text/javascript">
/*Second query plugin*/
<script type="text/javascript">
$(document).ready(function () {
$("#featured").zAccordi开发者_运维问答on({
width: 600,
height: 260,
tabWidth: 75
});
});
</script>
second added code to change position of title panel of collapsible panel according to expand and collapse..
<script src="http://code.jquery.com/jquery-1.5.js" type="text/javascript">
$(document).ready(function () {
var bodyHeight = $(document).height();
var panelHeight = $('#pnlSearchContent').height(); --CP content panel height
var panelHeightPosition = bodyHeight - panelHeight;
$('#pnlSearchTitle').offset().top = panelHeightPosition; -- CP Title panel final position
});
</script>
It appears that you are using 2 jQuery plugins and including Jquery js file twice (once for each plugin)
You must include Jquery js file only once that will be consumed by both the plugin js files.
When you view source, your html should look like this:
//this is the actual jquery javascript file.
<script type="text/javascript" src="jquery.min.js"></script>
<script type="text/javascript" src="Plugin-1.js"></script>
<script type="text/javascript" src="Plugin-2.js"></script>
Thanks
Simply remove <script src="jquery-1.4.2.min.js" type="text/javascript"></script>
from your code, you already include jquery-1.5.js
from external website.
精彩评论