[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details

cross-page hash link renders at bottom of page in firefox

Asked by thedesignary in Jquery, Scripting Languages, JavaScript

Tags: jQuery, codaslider, javascript

I'm having an issue with the codaslider plugin for jQuery.  Basically when I try to link from page A to a hash on page B the page settles at the bottom below the content that should be on screen. The problem doesn't exist in any browsers other than Firefox that I've found, but it is an issue that needs to be addressed.

You can see the code in action at www.massagewarehouse.com/selfcare.  If you click on one of the featured articles using firefox you'll see what I mean.

I'll include the portion of code from the plugin javascript that I think needs to be modified.
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
///portion of code from codaslider.js////
 
function trigger(data) {
	// auto height hack - needs to be first in the function
	var div = "#" + data.id;
	var divHeight = $(div).height()+5; 
	// add 5px to the overall height to ensure all text is displayed - the final height calc was cutting off text
	$(".scroll").animate({height: divHeight }, 400 );
	
	// end//
	var el = $('#slider .navigation').find('a[href$="' + data.id + '"]').get(0);
	selectNav.call(el);
	
}
 
if (window.location.hash) {
  trigger({ id : window.location.hash.substr(1) });
} else {
  $('ul.navigation a:first').click();
}
[+][-]10/02/09 01:37 PM, ID: 25481916Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/05/09 08:31 AM, ID: 25496180Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091021-EE-VQP-81 - Hierarchy / EE_QW_3_20080625