Sorry John, I did place
....
<script type="text/javascript" src="jquery-1-1-4.js"></script>
<script type="text/javascript" src="jquery.compat-1.0.js"></script>
....
and it produced the above error.

In several places of my application with JQuery-1.0.3, I use following
code to create tab,

JS FILE:
========
....
$(document).ready(function(){
        // tab
        activateTab = function(tabNode){
                var t = $(tabNode);
                gActiveTab = t.id();
                $('#tabID .on').removeClass('on');
                t.addClass('on');
                $('tabPanel').hide();
                $('#'+gActiveTab.substring(3).toLowerCase()).show();
        };
        $.each($('#mydiv1 ul li'), function(i, n){
                $('#' + n.id).click(function(){
                        activateTab(this);
                });
        });
});

...
HTML
====
<div id="mydiv1">
 <ul>
   <li class="on" id="tabOne"><a href="javascript:void(0);">Tab1</a></
li>
   <li id="tabTwo"><a href="javascript:void(0);">Tab2</a></li>
 </ul>
</div>
<div class="tabPanel" id="one"></div>
<div class="tabPanel" id="two"></div>
......

it runs so slow with large html file every time I jumped from one tab
to another. I thought it might be because of the element selection
function in JQuery 1.0.3. That's why I really want to upgrade my
JQuery to the latest one. Since it seems not working out for me, I
still use JQuery 1.0.3 and I tried to tweak my js code,

....
activateTab = function(tabNode){
        var t = $(tabNode);
        gActiveTab = t.id();
        $('#tabID .on').removeClass('on');
        t.addClass('on');
// this line I add div in front of the css class name
        $('div.tabPanel').hide();
        $('#'+gActiveTab.substring(3).toLowerCase()).show();
};
...
and it speeds things up.

However, I still want to upgrate my JQuery 1.0.3 to either JQuery
1.1.4 or 1.2.1. Any more advice?

Thanks,
Channa

Reply via email to