Jump to content

color scroll using ajax.


delickate

Recommended Posts

Hi guys,

I'm trying put scroll color using AJAX. but failed. I've a div like this:

<div  class="scroll-pane"  id="SLContainer"></div> 

 

I'm filling the dive using AJAX. On page load if i put color scroll code like below. it works fine.

$(document).ready(
				function($)
				{
                                              $('.scroll-pane').jScrollPane();
                                        }
                            );

 

but when i use same function to fill div. and put same color scroll code in ajax function. it doesn't color the scroll.

e.g


function ajax()
{
     ...
    .........

                  if (http_request.status == 200) 
                 {  
                     $('.scroll-pane').jScrollPane();
                 }
   ....
   ..
}

 

even i tried this:

 


function ajax()
{
     ...
    .........

                  if (http_request.status == 200) 
                 {  
                    $(document).ready(
				function($)
				{  $('.scroll-pane').jScrollPane();
                                        });
                 }
   ....
   ..
}

 

but no luck. can anyone guide me please???

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/262149-color-scroll-using-ajax/
Share on other sites

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.