PDA

View Full Version : Sticky bar issue



mediaslave
03-16-2012, 03:37 PM
1) Script Title: Expandable Sticky Bar

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

3) Describe problem: Hey guys

Trying to adapt this code to my joomla template. Works on the index page, goes to hell on every other page:

THE PAGE: http://dev.pushthepixel.ca/

THE CODE: http://www.dynamicdrive.com/dynamicinde ... ckybar.htm

Any ideas?

Thanks in advance!

ddadmin
03-17-2012, 05:59 AM
This is due to the path you've specified for the ajax content file inside expstickybar.js:


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

Instead of a relative URL (as is the case here) which breaks down if the page requesting it is not in your root directory, you should use an absolute URL to it instead, ie:


var mystickybar=new expstickybar({
id: "stickybar", //id of sticky bar DIV
position:'bottom', //'top' or 'bottom'
revealtype:'mouseover', //'mouseover' or 'manual'
peekamount:70, //number of pixels to reveal when sticky bar is closed
externalcontent:'http://dev.pushthepixel.ca/stickybarcontent.htm', //path to sticky bar content file on your server, or "" if content is defined inline on the page
speed:400 //duration of animation (in millisecs)
})

mediaslave
03-17-2012, 04:49 PM
Woohoo! Its perfect!

Thanks so much!