View Full Version : Expandable Sticky bar should stay open after reload

04-15-2014, 10:22 AM
1) Script Title: Expandable Sticky bar

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/stickybar.htm

3) Describe problem: Hello, we use the script to generate leads on a page. So we use gravity forms in the sticky footer. The problem is, that if the visitor submits the form, the page reloads and so the sticky footer will be "closed". So the visitor doesn´t see either an error or the success.
Is it possible to tell the sticky bar, that it should be always open until the visitor/user closes it manual?

Thanks a lot. we love this scrupt. thank you so much therefor.

best regards vervisio.

04-16-2014, 12:59 AM
Ok, try the below modified .js file, which adds the option:

statecontrol: {initial: 'open', persist: true},

to the initialization code (defined at the end of the .js file). With it, you can set the initial state of the panel when the page loads (either "open" or "close"), and also, whether the script to recall the last known state of the panel just before the page unloads or is reloaded. The below shows the complete initialization code with the new option above added in:

/////////////Initialization code://///////////////////////////

//Usage: var unqiuevar=new expstickybar(setting)

var mystickybar=new expstickybar({
id: "stickybar", //id of sticky bar DIV
position:'bottom', //'top' or 'bottom'
revealtype:'manual', //'mouseover' or 'manual'
peekamount:35, //number of pixels to reveal when sticky bar is closed,
statecontrol: {initial: 'open', persist: true},
externalcontent:'', //path to sticky bar content file on your server, or "" if content is defined inline on the page
speed:200 //duration of animation (in millisecs)