GithubHelp home page GithubHelp logo

Comments (3)

dafinley avatar dafinley commented on June 19, 2024

Actually figured it out. JScrollPane is expecting all the div elements to be in place when it runs...otherwise it would by psychic. Problem with gwt is that it runs all the javascript then starts processing the java code that creates the display elements.
By using a native event, and passing in the object, as so:

private static native void jScrollPane(YourClass y)/*-{

$wnd.showout = function(){

if([email protected]::firstTime()()){
$wnd.jQuery('.YourCssClass').jScrollPane();
[email protected]::notLongerFirstTime()();
}

}

}-*/;

Now you pass the showout javascript function to the onmouseover function of whatever element you want to effect using the getElement().setAttribute("onmouseover", "showout()") syntax and you should be golden

from jscrollpane.

vitch avatar vitch commented on June 19, 2024

Glad you figured it out. If you look at all of the jScrollPane examples you will see that the code to initialise jScrollPane happens in a jQuery document ready block. This ensures that the DOM is ready and so manipulations can be done to it when jScrollPane is initialised. I'm not familiar with GWT but I guess your code above is in some way equivalent to this...

from jscrollpane.

akopensrc avatar akopensrc commented on June 19, 2024

Hi dafinley,

The native method you mentioned, where to put this method and where to call this method from?

It would be great if you provide some explanation of the native method.
Thanks

from jscrollpane.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.