Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Update script/jquery.jscrollpane.js #195

Open
wants to merge 1 commit into from

3 participants

@qanuj

While using knockoutjs I found that its best to actually have the
wrapper specified for the DOM to be able to successfully keep getting
the jScrollPane result. having this fix should help others who intend
to use knockout and other template frameworks.

@qanuj qanuj Update script/jquery.jscrollpane.js
While using knockoutjs I found that its best to actually have the 
wrapper specified for the DOM to be able to successfully keep getting
the jScrollPane result. having this fix should help others who intend
to use knockout and other template frameworks.
98859ff
@drulia

This is a life saver snippet!

@thelinuxlich

+1 on this, it should be merged!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 5, 2012
  1. @qanuj

    Update script/jquery.jscrollpane.js

    qanuj authored
    While using knockoutjs I found that its best to actually have the 
    wrapper specified for the DOM to be able to successfully keep getting
    the jScrollPane result. having this fix should help others who intend
    to use knockout and other template frameworks.
This page is out of date. Refresh to see the latest.
Showing with 5 additions and 0 deletions.
  1. +5 −0 script/jquery.jscrollpane.js
View
5 script/jquery.jscrollpane.js
@@ -87,6 +87,11 @@
settings = s;
+ //fixes that would allow it work with existing dom in case used with templating engines.
+
+ pane = elem.find(".jspPane").length > 0? elem.find(".jspPane"): pane ;
+ container = elem.find(".jspContainer").length > 0? elem.find(".jspContainer"): container;
+
if (pane === undefined) {
originalScrollTop = elem.scrollTop();
originalScrollLeft = elem.scrollLeft();
Something went wrong with that request. Please try again.