Forum Moderators: open
Effect.OpenUp = function(element) {
element = $(element);
new Effect.BlindDown(element, arguments[1] ¦¦ {});
}
Effect.CloseDown = function(element) {
element = $(element);
new Effect.BlindUp(element, arguments[1] ¦¦ {});
}
Effect.Combo = function(element) {
element = $(element);
if(element.style.display == 'none') { new Effect.OpenUp(element, arguments[1] ¦¦ {}); }
else { new Effect.CloseDown(element, arguments[1] ¦¦ {}); }
}
My question is: How can i trigger BlindUp directly from url ?
Sample of my page is:
<a href="javascript:Effect.Combo('section1', {duration: 1, scaleX: false, scaleContent: false});"><h1>Click here to open 1</h1></a>
<div id="section1" style="display: none;">
<p>Text....</p>
</div>
<a href="javascript:Effect.Combo('section2', {duration: 1, scaleX: false, scaleContent: false});"><h1>Click here to open 1</h1></a>
<div id="section2" style="display: none;">
<p>Text 2222.</p>
</div>
So I want to place a link on different page and when user clicks on it I want him directed to this page with only "section2" displayed.(Using BlindDown)...
One way to do this is to pass a value in the hash tag portion of the link, then setup a listener on the target page to check for valid hash values. Basically:
<a href="/link/to/page.html#section2">Section 2</a>
Then in an onload event for the target page, test for the values of
location.hashand do your effects based on that.
I'd also set up a timeout to check for changes to that value, since a second click on a link to a different anchor value won't fire the onload event. So you have to poll for changes.