Hi everyone,
In my web page I have the following code:

In the head part the loading of jQuery library and a jQuery plugin
named jquery.queryNickName:
<script type="text/javascript" src="http://lib.community.virgilio.it/
js/lib/std/jquery/jquery-1.3.2.min.js"></script>
<script type='text/javascript' src='http://lib.community.virgilio.it/
js/lib/mtx/jquery/jquery.queryNickName/jquery.queryNickName-last-
min.js'></script>
<script type="text/javascript" src="/myvirgilio/js/index.js"></script>

In index.js javascript file I call the plugin in this way:

$(document).ready(function(){
        $('.queryNickName').queryNickName(
        {callback : function(nickname) {
                $(".queryNickNameLink").attr("href", "http://people.virgilio.it/
profilo/" + nickname);
        }});
});

The plugin is applied to this div inside the body of the html page:
<div class="profile">
        <h4>CIAO <a class="nick queryNickName">Nick</a></h4>
        <div class="profile_btn">
                <p><a class="queryNickNameLink" title="VAI AL TUO PROFILO">VAI 
AL
TUO PROFILO</a></p>
        </div>
</div>

When the page is loaded for the first time, the plugin works correctly
with all browsers.
Problems arise when I subsequently navigate to another web page and
then I go back to the first page.
After the back of the browser, the page is loaded but the plugin
doesn't work anymore.
This strange effect happens only with Safari and Google Chrome. In
Firefox and IE it all works correctly.

If I use Chrome debugger, I get the following message ONLY AFTER the
back of the browser and NOT the first time the page is loaded:

Uncaught TypeError: Object #<an Object> has no method 'queryNickName'

It seems that the second time, only after the back button, the jquery
library is reloaded and I loose the binding
between the plugin and the library.

How can I resolve this problem?

Thanks a lot.

Federico

Reply via email to