pstein Posted April 8, 2016 Share Posted April 8, 2016 (edited) Lets start with a (german) sample webpage which shows some data information:https://www.wikifolio.com/de/de/wikifolio/futecusNow when user click on a "+" sign right of one of the grey bars in the mid (e.g. right of "Aktuelles Portfolio")then the content inside this section is expanded.Unfortunately I cannot tell the webpage to always automatically expand this section when it is loaded.So I need some javascript/CSS/jQuery statements in a Greasemonkey script to emulation/simulate such a mouse click.Have a look at the following snapshot of Firebug inside Firefox:http://postimg.org/image/mlcjwdnh7/You can see yellow hightlighted parameters which change when users click on the "+" and toogle expansion status. How can I emulate/simulate these changes (=a mouse click) with Javascript/CSS? Peter Edited April 8, 2016 by pstein Link to comment Share on other sites More sharing options...
justsomeguy Posted April 8, 2016 Share Posted April 8, 2016 The plus sign (an i element) has click handlers defined on it, so if you execute the click method on that element then it will cause the click handlers to run. Link to comment Share on other sites More sharing options...
pstein Posted April 11, 2016 Author Share Posted April 11, 2016 (edited) @justsomeguy: Thank you for the answer. But: What excatly is a click handler? The element in focus looks like: <i class="ieon-expand accordion-icon pull-right"></i> What is the corresponding click handler? How do I execute such a click method from JavaScript? Peter Edited April 11, 2016 by pstein Link to comment Share on other sites More sharing options...
thescientist Posted April 11, 2016 Share Posted April 11, 2016 event handlers are covered in a couple different sections within the w3schools JS tutorial http://www.w3schools.com/js/default.asp Link to comment Share on other sites More sharing options...
justsomeguy Posted April 11, 2016 Share Posted April 11, 2016 You can probably use element.click to execute the click handler for that element. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now