Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.