Jump to content

Help with calling Ajax function


altinnovation2

Recommended Posts

Hello,

 

I have a Jquery scrollbar that does not "refresh" when my dynamic content changes the height of the section.

 

I was told to run this ajax function: mCustomScrollbar

 

How can I run that function after clicking a link?

 

Specifically, this is what was said:

 

Hello,

 

Seems that many users have problems calling the scrollbar function on dynamically loaded content, so I’ve decided to include an additional tiny plugin (plugin info: http://benalman.com/projects/jquery-resize-plugin/) that checks when content changes its width or height and automatically calls scrollbar function.

 

Firstly, get the plugin file:

http://manos.malihu.gr/tuts/jquery.ba-resize.min.js

and put it in the directory of your document.

 

In the head of your document, before the closing head tag add:

<script src="jquery.ba-resize.min.js"></script>

 

At the bottom script, below your LoadNewContent function add:

$(".content").resize(function(e){

$("#mcs5_container").mCustomScrollbar("horizontal",400,"easeOutCirc",1,"fixed","yes","yes",20);

});

 

With this, you can remove the other callback functions calls of mCustomScrollbar.

 

Thanks a lot :)

Link to comment
Share on other sites

Maybe, but I don't even know how to execute an AJAX script, nevertheless have it executed when a link is clicked.

 

Furthermore, it doesn't talk about whether to put the script at the top of the page,header or bottom.  :shrug:

 

What I would like is a more "easy to understand" way of explaining what I need to do to update that scroll bar.

 

Thanks :)

Link to comment
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.