Jump to content

Jquery load and possible memeory leak - please help


leruman

Recommended Posts

Greetigns to all

 

I am beginner in java script and jquery. I have encountered problem which can not solve. On left side of my site have some buttons that when are clicked load in another  div  php script which also has his java script.  Code works ok, but after several clicks memory load get very big.

 

I see two problems with this - some bug in Ajax load () function (less probably) or I am doing this on wrong way (more probably).

 

I would be grateful if someone look in this and try to find where I made mistake. I am planing lot of elelments of my page to base on this load() metod and to be loaded this way, so need to find what i am doing worong in the begining.

 

Nota: Code is done in procedural way, I am not ready to go to object until i  master this.

 

JQuery script that caled after button is clicked:

         $('.xxx').click(function()
            { 
                $('.content').empty().load('viewchar.php', 
                    {
                        char:$(this).next('.hiddenP').val()  
                });
        });

Part of html code that trigers script

<div class='name' >
<input type='reset' id='character94' class='xxx' value='dfgfdg'/>
<input type='text' value='94' class='hiddenP'/>
</div> 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.