altinnovation2 Posted June 29, 2011 Share Posted June 29, 2011 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 More sharing options...
Adam Posted June 30, 2011 Share Posted June 30, 2011 Shouldn't you apply it as instructed by the author? Link to comment https://forums.phpfreaks.com/topic/240732-help-with-calling-ajax-function/#findComment-1236726 Share on other sites More sharing options...
altinnovation2 Posted June 30, 2011 Author Share Posted June 30, 2011 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. 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 https://forums.phpfreaks.com/topic/240732-help-with-calling-ajax-function/#findComment-1236859 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.