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
https://forums.phpfreaks.com/topic/240732-help-with-calling-ajax-function/
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 :)

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.