Spry Gallery and Sliding Panel help.
Hi all,
Sorry for my english, i'm french lol.
I want combined the gallery with the sliding panel for
display the thumbnails but I am blocked.
Any help would be appreciated!
Thanks
Can you provide more information about your project?
Are you loading the thumbs through Spry Data?
Have you seen:
http://labs.adobe.com/technologies/spry/samples/slidingpanels/SlidingPanelsSample2.html
Thanks,
Don
Similar Messages
-
Sliding Panels Help for Javascript Idiot
I have a simple thumbnail gallery to which I am attempting to
apply the Spry Sliding Panels widget. I am creating the gallery
from an xml file, and this seems to be working fine.
I looked at the code of the Sliding Panels examples, but
being the Spry and javascript idiot that I am, I was not able to
incorporate the Sliding Panels successfully. Would someone mind
taking a look at my code and perhaps commenting about how I would
go about adding the sliding panel? I would appreciate it.
P.s., I currently have 5 thumbnails visible. I would like to
slide to the next 5 on the click of the arrows that are included.
Here is the code, without any of my failed attempts at SP
included:
<!---Begin Thumbs Holder--->
<div id="thumbsmask">
<div id="thumbsbox" spry:region="dsPhotos dsGalleries
dsGallery">
<div id="p{ds_RowNumber}" spry:repeat="dsPhotos">
<div class="thumb">
<img id="tn{ds_RowID}"
alt=""
src="galleries/{dsGalleries::@base}{dsGallery::@base}/thumbnails/{@thumbpath}"
width="90"
height="90"
style="opacity:0.3; filter:alpha(opacity=30)"
onmouseover="MM_effectAppearFade('tn{ds_RowID}', 500, 30,
100, false)"
onmouseout="MM_effectAppearFade('tn{ds_RowID}', 500, 100,
30, true)"
onclick="HandleThumbnailClick('{ds_RowID}');"
title="tn{ds_RowID}" />
</div>
<div class="thumbspacer"></div>
</div>
</div>
</div>
<!---End Thumbs Holder--->
<div id="arrowholder">
<div id="arrowright">
<a href="#">
<img src="images/arrowright.png" alt="left" width="20"
height="20" align="right" border="0" />
</a>
</div>
<div id="arrowleft">
<a href="#">
<img src="images/arrowlef.png" alt="right" width="20"
height="20" border="0" />
</a>
</div>
</div>Thanks for the response.
I have tried to implement that, and it still does not work.
Here is my code with it implemented.
Thanks again.
<script type="text/javascript">
<!--
var dsGalleries = new
Spry.Data.XMLDataSet("galleries/galleries.xml",
"galleries/gallery");
var dsGallery = new
Spry.Data.XMLDataSet("galleries/{dsGalleries::@base}{dsGalleries::@file}",
"gallery");
var dsPhotos = new
Spry.Data.XMLDataSet("galleries/{dsGalleries::@base}{dsGalleries::@file}",
"gallery/photos/photo");
function TruncateStrIfNeeded(str, maxChars)
// Decode our string so when we count characters, we aren't
counting
// the chars in an entity name.
str = Spry.Utils.decodeEntities(str);
if (str.length > maxChars)
str = str.substr(0, maxChars - 4) + " ...";
return Spry.Utils.encodeEntities(str);
dsPhotos.addObserver({ onPostLoad: function() {
var numberOfPanelsPerView = 5;
var rows = dsPhotos.getData();
var numRows = rows.length;
// Add some custom columns to our data set.
for (var i = 0; i < numRows; i++)
var row = rows
// Add a 'teaser' column which is basically the description,
// but truncated so it can fit within our panel.
row.teaser = TruncateStrIfNeeded(row.desc, 400);
// Add a 'viewStartIndex' column that indicates what view
this row
// belongs to.
row.viewNumber = Math.floor(i / numberOfPanelsPerView) + 1;
row.viewStartIndex = i - (i % numberOfPanelsPerView);
row.prevStartIndex = row.viewStartIndex -
numberOfPanelsPerView;
row.nextStartIndex = row.viewStartIndex +
numberOfPanelsPerView;
//-->
</script>
<script type="text/javascript"
src="scripts/gallery.js"></script>
<<<<<<<<<<<<<<body>>>>>>>>>>>>>>>
<!---Begin Thumbs Holder--->
<div id="thumbsmask">
<div id="thumbsbox" spry:region="dsPhotos dsGalleries
dsGallery">
<div id="p{ds_RowNumber}" spry:repeat="dsPhotos">
<div class="thumb">
<img id="tn{ds_RowID}"
alt=""
src="galleries/{dsGalleries::@base}{dsGallery::@base}/thumbnails/{@thumbpath}"
width="90"
height="90"
style="opacity:0.3; filter:alpha(opacity=30)"
onmouseover="MM_effectAppearFade('tn{ds_RowID}', 500, 30,
100, false)"
onmouseout="MM_effectAppearFade('tn{ds_RowID}', 500, 100,
30, true)"
onclick="HandleThumbnailClick('{ds_RowID}');"
title="tn{ds_RowID}" />
</div>
<div class="thumbspacer"></div>
</div>
</div>
</div>
<!---End Thumbs Holder--->
<div id="arrowholder">
<div id="arrowright" spry:if="{ds_RowNumber} % 2 == 0
&& {prevStartIndex} >= 0">
<a href="#" onclick="sp1.showPanel('p{prevStartIndex}');
return false;">
<img src="images/arrowright.png" alt="left" width="20"
height="20" align="right" border="0" />
</a>
</div>
<div id="arrowleft"spry:if="{ds_RowNumber} % 2 != 0
&& {nextStartIndex} < {ds_RowCount}">
<a href="#" onclick="sp1.showPanel('p{nextStartIndex}');
return false;">
<img src="images/arrowlef.png" alt="right" width="20"
height="20" border="0" />
</a>
</div>
</div>
<script type="text/javascript">
var sp1 = new Spry.Widget.SlidingPanels("thumbsmask");
</script> -
AS 2 sliding panel - AS 3 sliding panel help
hey all,
i was using a script to animate some site content with a
sliding panel easing effect in AS 2, but when i try to run the
script in AS 3 it doesn't work. is there a way to convert this to
AS 3 quickly?
baseRate = 3.5;
difference = _parent.targetx - _parent.panel._x;
rate = difference / baseRate
_parent.panel._x += rate;
if this doesn't convert to AS 3, does anyone know of a good
easing formula in flash 9?
thanks for the help!I forgot to mention that I put some test pages which
demonstrate the panels outside the table structure.
just the sliding panels:
http://www.rightonstudio.com/client/staging/jenko/chelsea/html/testimonials2.html
and with a table on top for the header section, divs in the
middle for the panels, and table on the bottom for the footer
section. This works but the alignment is all off in IE6,7 but not
in Safari and a little off in FF. :
http://www.rightonstudio.com/client/staging/jenko/chelsea/html/testimonials3.html
-L -
Spry Sliding Panel bugs with Flash SWF, iFrames, CSS background images
Greetings,
I'm working on a site right now that is build with Spry 1.6
Sliding Panels. On the home panel I have integrated a looping SWF,
and scrolling iFrames on the Overview panel. After extensive
research on these forums, I'm still scratching my head at a few
bugs listed below:
• Firefox (MAC v2.0.0.14)
- The SWF on the home panel doesn't hide properly when
sliding to a different panel. I have set 'wmode opaque' parameters
to the flash file, but this seems to have not resolved the issue.
- Additionally, I've noticed that sometimes the SWF will not
finish sliding into the correct position when clicking to the home
panel (the SWF will stop sliding several pixels left of the
original positioning).
- The SWF (which happens to be a loop animation) resets every
time the home panel is visited. In my testing, this does not happen
in any other browser.
- On the Overview panel, scrolling iFrames are used on the
"Staff Profiles". These iFrames don't hide properly when clicking
through other panels, as the scroll bars are still viewable.
- Overall, the sliding animation is a bit choppy compared to
all other browsers. I can live with this, but I wonder if I have
improper code somewhere?
• Opera (MAC v9.27)
- Same issue as above concerning the fact that the SWF
appears outside of the sliding panel view port.
• IE 6
- CSS background images flash during the sliding panel
animation.
* Site page links *
Main URL
Home
Page iFrame
Overview
Page iFrame
* CSS *
Main
site-wide CSS
Sliding
Panels CSS
* Scripts *
Sliding
Panels Sript
Any suggestions, pointers would be much appreciated!
Cheers,
ChrisGreetings,
I'm working on a site right now that is build with Spry 1.6
Sliding Panels. On the home panel I have integrated a looping SWF,
and scrolling iFrames on the Overview panel. After extensive
research on these forums, I'm still scratching my head at a few
bugs listed below:
• Firefox (MAC v2.0.0.14)
- The SWF on the home panel doesn't hide properly when
sliding to a different panel. I have set 'wmode opaque' parameters
to the flash file, but this seems to have not resolved the issue.
- Additionally, I've noticed that sometimes the SWF will not
finish sliding into the correct position when clicking to the home
panel (the SWF will stop sliding several pixels left of the
original positioning).
- The SWF (which happens to be a loop animation) resets every
time the home panel is visited. In my testing, this does not happen
in any other browser.
- On the Overview panel, scrolling iFrames are used on the
"Staff Profiles". These iFrames don't hide properly when clicking
through other panels, as the scroll bars are still viewable.
- Overall, the sliding animation is a bit choppy compared to
all other browsers. I can live with this, but I wonder if I have
improper code somewhere?
• Opera (MAC v9.27)
- Same issue as above concerning the fact that the SWF
appears outside of the sliding panel view port.
• IE 6
- CSS background images flash during the sliding panel
animation.
* Site page links *
Main URL
Home
Page iFrame
Overview
Page iFrame
* CSS *
Main
site-wide CSS
Sliding
Panels CSS
* Scripts *
Sliding
Panels Sript
Any suggestions, pointers would be much appreciated!
Cheers,
Chris -
Getting a sliding panel loaded into an html panel to work.
Hi. This is my first post on the forum.
I've been using Spry a little here and there. Today I ran
into a situation where I want to load an external page, that has a
sliding panel in it, into an html panel. So far I have not had luck
and I suppose it has to do with loading the js file. At the moment
I have a right column that already has a sliding panel (working).
But it would appear that the loaded external html file (in the left
"main" column) is not picking that up. Any suggestions for a noob
as to what to do next? Viewing the external page by itself allows
the sliding panel to work (that is when I add the js file import to
the head of the external html file... but that head section does no
good when loaded into an html panel)
Anyway, any help at all is greatly appreciated.
Thanks,
EricThank you very much! I found the topic
here.
It will require a bit of a small learning curve for me as html
panel and sliding panels are my first interaction with js... even
my rollovers are css driven. Thanks! -
Hi,
I do not know if this is the right place. If not, please tell me where to ask.
I do not know nothing of programing and my use of a program is to "click" on shortuct. I am familiar with using Tabbed panels, Accordion and Collapsible panel.
But I would like to know how to use sliding panels. I have read a lot on this links:
http://livedocs.adobe.com/en_US/Spry/SDG/help.html?content=WS5F39D2B9-A298-472a-8E50-AC4B1 0984EFC.html
but I do not know how to start. I do not understand English very much and do not have computer knowledge.
So, is there a way for me to "click" on a widget or icon of a SPry to make sliding panels?
On this link are samples, but I realy have no idea, how to make this.
http://labs.adobe.com/technologies/spry/samples/slidingpanels/SlidingPanelsSample.html
Thank youHi Natasa,
If you go to http://labs.adobe.com/technologies/spry/samples/slidingpanels/SlidingPanelsSampl e.html and right click on the page, a popup menu will appear. There you will see an item name 'view source'. By clicking on that item it will open a new window with the source code. Select all and copy the source code to your HTML editor on your own computer. There you can experiment with the code at hearts content.
I hope this helps.
Ben
PS. My apologies, I did not realize that this topic had already been answered.
Message was edited by: vw2ureg -
Having trouble with flash and linking to Sliding panels - PLEASE help
Having trouble with Sliding panels and flash. Otherwise everything works fine but when I'm trying to implement the link
<a href="#" onclick="sp1.showPanel('panel1'); return false;">Panel1</a>
to a flash button I get confused. I have tried following
on (press) {
getURL("javascript:sp1.showPanel('panel1');");
and it did not work. What would you suggest? I am desperate. Please help me! Any suggestions are highly appreciated!!!!Thanks for your answer!
I have tried both sp1.ShowPanel('panel1'); and window.sp1.ShowPanel('panel1'); they both give blank window with [object]
I have found a solution that works in other browsers, but not in IE. Well basicly it works, but after a few clicks IE freezes.
on (press) {
getURL("javascript:sp1.showPanel('panel1'); void(0);");
Would you happen to have a solution other than that? I believe that the void(0); causes the IE to freeze. -
SIFR 3 and Spry Sliding Panels
I am having trouble combining spry sliding panels and sIFR 3
r419 in firefox. Implementation works perfectly in IE6 & 7 but
in FF3 the headings flicker as one panel slides out and as another
slides in.
I have tried adding sIFR.replace to onclick to combat this,
as described in another post but to no avail.
Does anyone have any suggestions?
Many thanks
MarcelAdd a valid Document Type Declaration on your page. (DTD) and it should work smoothly.. You could have found this out if you would just validate your page. validator.w3.org.
-
I've been working on extending Spry's Sliding Panels to allow
me to set a timer to auto advance to the next panel. Whilst I had
success with a script that targeted a particular element (eg sp1)
it really isn't terribly useful to have to recode per panel. So
trying to extend instead. Problem is that I keep getting an error
that says the advanceToNextPanel function doesn't exist. Hoping
someone might be able to point me in the right direction. Code
below:
// Sliding Panel Timer
// Based upon
http://labs.adobe.com/technologies/spry/demos/gallery/gallery.js
and feedback within the Adobe Spry forum
// Extend SlidingPanels to include additional data
Spry.Widget.SlidingPanels.prototype.gPanelShowInterval =
1000; // msecs between panels
Spry.Widget.SlidingPanels.prototype.gPanelShowOn = false;
Spry.Widget.SlidingPanels.prototype.gPanelShowTimer = null;
Spry.Widget.SlidingPanels.prototype.gAutoStartPanelShow =
true;
Spry.Widget.SlidingPanels.prototype.addPanelShowTimer =
function()
if (this.gPanelShowInterval == undefined)
this.gPanelShowInterval = 10000; // msecs between panels
if (this.gAutoStartPanelShow)
this.startPanelShow();
// Kill any previous timer event
Spry.Widget.SlidingPanels.prototype.killPanelShowTimer =
function() {
if (this.gPanelShowTimer)
clearTimeout(this.gPanelShowTimer);
this.gPanelShowTimer = null;
// Display next sliding panel on rotational loop
Spry.Widget.SlidingPanels.prototype.advanceToNextPanel =
function() {
var tPanels = this.getContentPanels().length - 1; // Total
Panels
var cPanel = this.getContentPanelIndex(this.currentPanel);
// Index of currently displayed panel
if (tPanels == cPanel)
this.showFirstPanel(); // Return to the first panel
else
this.showNextPanel(); // Show the next sliding panel
this.setPanelShowTimer();
// Setup timer event to change to next panel
Spry.Widget.SlidingPanels.prototype.setPanelShowTimer =
function() {
this.killPanelShowTimer(); // Kill any previous timer event
this.gPanelShowTimer = setTimeout( function() {
this.gPanelShowTimer = null; this.advanceToNextPanel(); },
this.gPanelShowInterval);
// Start the timed sliding panel
Spry.Widget.SlidingPanels.prototype.startPanelShow =
function() {
this.gPanelShowOn = true;
this.setPanelShowTimer();
};My previously posted I'd fixed this but it is in fact not
working.
Hi hope you can help.
My Spry Sliding panel is appearing over my floats in IE, fine
in Firefox.
Test
page here
Sliding
Panels CSS Here
Any ideas?
Is this a spry problem or my CSS?
Thanks.
Rich -
Spry Sliding Panels Question..
Hello,
I'm building a website and want to have a small image gallery page, with Spry Sliding Panels as the framework. Everything was working fine until I realized that in the browser, when I clicked the link to go the next panel, the actual web page itself automatically snaps back up to the top before the panel actually slides. I was wondering how to fix this because the gallery is about halfway down the page, and it looks stupid when the page jumps back up to the top each time. Thanks for your help...Yes, your panel button code (with my change) should look like this:
<div class="panelbtn"><a href="javascript:;" onclick="sp1.showFirstPanel(); return false;">1</a></div>
<div class="panelbtn"><A href="javascript:;" onclick="sp1.showPanel(p2); return false;">2</a></div>
<div class="panelbtn"><A href="javascript:;" onclick="sp1.showPanel(p3); return false;">3</a></div>
<div class="panelbtn"><A href="javascript:;" onclick="sp1.showPanel(p4); return false;">4</a></div>
This is what I meant when I said to replace the # with the word javascript:;
Beth -
How to link a specific panel with spry multiple element sliding
How to everybody to the forum, I've searched into this forum but maybe this mine is a particular case...
I've a html page with 4 different spry multiple sliding panels, named "primo" "secondo" terzo" "quarto", and all worked fine :-)
When you go to this page the first you can see is "primo" (default).
But the problem/question is this: If i want to send an email link to my page and want to see the "terzo" panel. how???
I've try to search many examples but none one of them meet me.
This is an example of this page called test.html
Many thanks to all wants help me
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- Copyright (c) 2006-2007. Adobe Systems Incorporated. All rights reserved. -->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Spry Multiple Elements Sliding Sample</title>
<link href="http://labs.adobe.com/technologies/spry/css/samples.css" rel="stylesheet" type="text/css" />
<script src="http://labs.adobe.com/technologies/spry/includes/SpryEffects.js" type="text/javascript" ></script>
<script src="http://labs.adobe.com/technologies/spry/includes/SpryURLUtils.js" type="text/javascript" ></script>
<style type="text/css">
.demoDiv{
height: 150px;
overflow: hidden;
.hiddenElement{
display:none;
/* Fix IE floating bug */
position: absolute;
top: 180px;
</style>
<script type="text/javascript">
var observer = {};
observer.nextEffect = false;
observer.onPostEffect = function(e){
if (this.nextEffect)
var eff = this.nextEffect;
setTimeout(function(){eff.start();}, 10);
this.nextEffect = false;
function pannelli(currentPanel)
// The list of all the panels that need sliding
var panels = ['slide1', 'slide2', 'slide3', 'slide4'];
var opened = -1;
// Let's check if we have an effect for each of these sliding panels
if (typeof effects == 'undefined')
effects = {};
for (var i=0; i < panels.length; i++)
if (typeof effects[panels[i]] == 'undefined'){
effects[panels[i]] = new Spry.Effect.Blind(panels[i], {from: '0%', to: '100%', toggle: true});
effects[panels[i]].addObserver(observer);
if (effects[panels[i]].direction == Spry.forwards && currentPanel != panels[i])
opened = i;
//prevent too fast clicks on the buttons
if (effects[panels[i]].direction == Spry.backwards && effects[panels[i]].isRunning)
observer.nextEffect = effects[currentPanel];
return;
if (opened != -1)
observer.nextEffect = effects[currentPanel];
effects[panels[opened]].start();
else if (effects[currentPanel].direction != Spry.forwards)
effects[currentPanel].start();
</script>
</head>
<body onload="pannelli('slide1');">
<h3>Spry Multiple elements sliding</h3>
<a href="#" onclick="pannelli('slide1');" value="Slide 1">SLIDE 1</a>
<a href="#" onclick="pannelli('slide2');" value="Slide 2">SLIDE 2</a>
<a href="#" onclick="pannelli('slide3');" value="Slide 3">SLIDE 3</a>
<a href="#" onclick="pannelli('slide4');" value="Slide 4">SLIDE 4</a>
<br />
<div id="slide1" class="hiddenElement">
<div class="demoDiv" style="background-color: yellow;">
<h4>Primo</h4>
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed
diam nonumy eirmod tempor invidunt ut labore et dolore magna
aliquyam erat, sed diam voluptua. At vero eos et accusam et
justo duo dolores et ea rebum. Stet clita kasd gubergren, no
sea takimata sanctus est Lorem ipsum dolor sit amet.
</div>
</div>
<div id="slide2" class="hiddenElement">
<div class="demoDiv" style="background-color: pink;">
<h4>Secondo</h4>
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed
diam nonumy eirmod tempor invidunt ut labore et dolore magna
aliquyam erat, sed diam voluptua. At vero eos et accusam et
justo duo dolores et ea rebum. Stet clita kasd gubergren, no
sea takimata sanctus est Lorem ipsum dolor sit amet.
</div>
</div>
<div id="slide3" class="hiddenElement">
<div class="demoDiv" style="background-color: magenta;">
<h4>Terzo</h4>
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed
diam nonumy eirmod tempor invidunt ut labore et dolore magna
aliquyam erat, sed diam voluptua. At vero eos et accusam et
justo duo dolores et ea rebum. Stet clita kasd gubergren, no
sea takimata sanctus est Lorem ipsum dolor sit amet.
</div>
</div>
<div id="slide4" class="hiddenElement">
<div class="demoDiv" style="background-color: green;">
<h4>Quarto</h4>
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed
diam nonumy eirmod tempor invidunt ut labore et dolore magna
aliquyam erat, sed diam voluptua. At vero eos et accusam et
justo duo dolores et ea rebum. Stet clita kasd gubergren, no
sea takimata sanctus est Lorem ipsum dolor sit amet.
</div>
</div>
<br />
Test per collegamenti esterni<br /><br />
<a href="test.html?">vai al pannello I°</a> |
<a href="#">vai al pannello II°</a> |
<a href="#">vai al pannello III°</a> |
<a href="#">vai al pannello IV°</a>
</body>
</html>silemma wrote:
else if (effects[currentPanel].direction != Spry.forwards)
effects[currentPanel].start();
</script>
</head>
<body onload="pannelli('slide1');">
Change the above to
else if (effects[currentPanel].direction != Spry.forwards)
effects[currentPanel].start();
var params = Spry.Utils.getLocationParamsAsObject(); //get the URL parameter
if (params.slide) { // if the slide parameter exists
var slide = 'slide'+params.slide; // slide = slide+slide parameter
} else { // otherwise
slide = 'slide1'
</script>
</head>
<body onload="pannelli(slide);"> <!-- open the nominated slide -->
Then when calling the page use the following notation: http://localhost/test/test.html?slide=3 where ?slide=3 is the third slide
I hope this helps.
Ben -
Edit JS on spry sliding panels widget to fix auto panel height problem
Hi guys,
Ive been trying for a while to make the sliding panels widget
show each panel in its own height instead of the longest panel's height in the container.
I tried reading all the js file to play with it and find a solution but the truth is i dont know how to do what i want.
I do, however, have a list of things that i believe if implemented should work,
could you help me do these fixes on the js? ( any one you know how to or think will work )
1. edit so that: Panels dont have any height ( or panel content display none ) if it isnt current panel. If current panel is "id:1" the assume class 1 style properties. As soon as it looses focus/"currentpanel" class it looses its class 1 properties. And the new current panel ("id:2") assumes its own class 2 properties. And so on.
2. edit so that: PanelContainer ( the one that holds all the panels ) displays none BUT the current panel. So all panels could be display none unless they assume the "currentpanel" class and so they change to display. Maybe this way the container assumes only the height of the displayed panel and looses it once its no longer displayed assuming the next displayed one.
3. edit so that: Panel container checks for current panel's height and assumes that height instantly ( there is still a panel inside the container that would be longer than the current panel, maybe with overflow hidden this isnt a problem )
4. Using SpryDOMUtils.js I am currently playing with the code pasted below,
the idea came from Gramp's Spry Sliding Panels Group Navigation Buttons cookbook
He addresses a different problem, but since it has to do with identifying the current panel and doing something when the panel is x number, i thought there could be a height property set for each panel when each is the current one, atleast something can be done with this, my problem is i dont know how to set that something. Please check out the following code:
<script>
// The following function - setPanelNavigation() - assumes the following
// 1. Sliding Panels have a class of SlidingPanelsContent AND a unique ID
// 2. The Previous Panel button has an ID of previousPanel
// 3. The Next Panel button has an ID of nextPanel
// 4. SpryDOMUtils.js has been linked
function setPanelNavigation() {
var current = sp1.getCurrentPanel(); // Get the current panel
var panelCount = sp1.getContentPanelsCount(); // Get the total number of panels
var panelNumber=1; // Give a value to the first panel number
Spry.$$(".SlidingPanelsContent").forEach(function(node) { // Cycle through the panels
if (node.id==current.id){ // The current panel now receives a number
if ( panelNumber==1 ) Spry.$$(".SlidingPanelsContentGroup").setAttribute('height', 750); //
if ( panelNumber==2 ) Spry.$$(".SlidingPanelsContentGroup").setAttribute('height', 250); //
panelNumber++; // Go to next panel after incrementing the count
Spry.Utils.addLoadListener(setPanelNavigation); // Set buttons to initial value
var sp1 = new Spry.Widget.SlidingPanels("panelwidget");
</script>
What am i doing wrong in that bit ? I thought i had it there, but it didnt work.
Anyone, please help. Thank you.wait my bad, the link to my page is:
http://www.pupr.edu/department/industrial/students.asp
** no s on department -
Spry Sliding Panels not working in IE
I've been working for about 12 hours straight on getting this
working correctly - my Sliding Panels just aren't working at all in
IE. The panels load properly - for example, you can see only the
first loaded panel, not all of them - but when I click a link to
switch to the next, nothing happens. Firebug is reporting no
errors, and neither is IE. Here is the relevant code:
<head><script type="text/javascript"
src="SpryAssets/SprySlidingPanels.js"></script>
<link type="text/css" rel="stylesheet"
href="SpryAssets/SprySlidingPanels.css"></head>
<div id="mainContent">
<div id="panelwidget" class="SlidingPanels">
<div class="SlidingPanelsContentGroup">
<div class="SlidingPanelsContent" id="main">Main
Content<br /><a href="images/news.png" rel="lytebox"
title="Omgtest!"><img src="images/news.png"
/></a><br /> <a href="javascript:void(0);"
onclick="sp1.showPanel('series');">TEST</a></div>
<div class="SlidingPanelsContent" id="series">Series
and Models</div>
<div class="SlidingPanelsContent" id="about">About and
Bio</div>
</div>
</div>
<script type="text/javascript">var sp1 = new
Spry.Widget.SlidingPanels("panelwidget");</script>
</div>
The following might be somewhat related: I am using the
Lytebox javascript library, which is a Lightbox clone (that doesn't
use prototype), as well as a preloader for my mouseover nav bar,
with this code:
<script type="text/javascript">
function init() {
MM_preloadImages('images/menu/main_click-trans.png','images/menu/main_hover-trans.png','i mages/menu/series_click-trans.png',
'images/menu/series_hover-trans.png','images/menu/about_click-trans.png','images/menu/abo ut_hover-trans.png');}
</script>
My nav bar links to the panels like this:
onclick="MM_nbGroup('down','group1','Main','images/menu/main_click-trans.png',1);
sp1.showPanel('main'); return false"
However, a plaintext link inside of the first panel - "<a
href="javascript:void(0);"
onclick="sp1.showPanel('series');">TEST</a>" - does not
work either.
Just for fun I thought I would try adding min-height:0; zoom:
1; to the CSS classes for slidingpanels.... no dice there as well.
URL is
www.goldensealdrums.com/wip
Any ideas? I am at a complete loss. Thanks.Thanks for your help :] I ended up realizing that a huge
bloated js navbar wasn't all that great of an idea anyway, so I
scrapped it and used a CSS-based one instead...much cleaner and
works better (no preloading! woohoo.) It looks like the problem was
probably an amalgamation of many things, but it's resolved now.
quote:
IE doesn't seem to like the PNG images you are using
understatement of the decade. -
HI,
I am trying to incoperate the "Spry Sliding" feature in my
website.But problem is coming that I have to define the height of
the container of each sliding panel(So,its not giving the
flexibilty) If I am removing the height than the all panels are
showing (So,the effect of sliding panel is lost).
So help me how to define the same feature without the
"HEIGHT".I am using the examples/demos given on the spry offical
website.
Thanks,Yes that sounds about right. As usual I am trying to figure
out ways to have a nice navigation and be able to have a good
amount of copy live on the page and keep the web pages footer
within the viewers browser window. The search continues. -
Multiple sets of Spry Tabbed Sliding Panels?
I have my code set up for one sliding panel set with three tabs but I want to copy that set and create another set of the same 3 sliding tabs right below it with different content. However, when I copy it to the next set, clicking the second set of tabs still causes the first sets sliding Panel to slide. Furthermore, a few elements of the css are no longer being read for the second set, including the script in the .SlidingPanels that hides any of the text box outside of the specified dimensions.
Attached are a txt file for my html and css if that helps.
Any help on this would be greatly appreciated.
Thanks!
[Moved to Spry forum by moderator]The constructor appears at the bottom of your sliding panel code, in exactly the format that Arnout has shown. You do not need to go into the javascript file for it.
But the first thing I think you need to do is to make sure that you match the classes (and format) you are using with the classes per your sliding panels style sheet.
Here is the essential markup (your content is not here; this is based on a plain example widget):
<div style="margin: 0 auto; width: 350px; border: solid 1px red;">
<a href="#" onclick="sp.showFirstPanel();">First Panel</a> | <a href="#" onclick="sp1.showPreviousPanel();">Previous Panel</a> | <a href="#" onclick="sp1.showNextPanel();">Next Panel</a> | <a href="#" onclick="sp1.showLastPanel();">Last Panel</a> | <a href="#" onclick="sp1.showPanel('p4');">Panel 4</a><!--example to show specific panel-->
<div id="panelwidget" class="SlidingPanels" style="margin: 0 auto;">
<div class="SlidingPanelsContentGroup">
<div class="SlidingPanelsContent" id="p1">Panel 1</div>
<div class="SlidingPanelsContent" id="p2">Panel 2</div>
<div class="SlidingPanelsContent" id="p3">Panel 3</div>
<div class="SlidingPanelsContent" id="p4">Panel 4</div>
<div class="SlidingPanelsContent" id="p5">Panel 5</div>
<div class="SlidingPanelsContent" id="p6">Panel 6</div>
</div>
</div>
<script type="text/javascript">
var sp1 = new Spry.Widget.SlidingPanels("panelwidget");
</script>
Note that the ID of the <div id="panelwidget" class="SlidingPanels"> matches the "panelwidget" in the constructor
var sp1 = new Spry.Widget.SlidingPanels("panelwidget");
For your second panelgroup, make <div id="panelwidget_01" class="SlidingPanels"> and change the constructor to
var sp2 = new Spry.Widget.SlidingPanels("panelwidget_01");
And of course the onclicks in the nav area should change for the second sliding panels set to use sp2 instead of sp1.
I hope that Arnout will correct me if I have got it wrong!
Best,
Beth
Maybe you are looking for
-
m was fine. I keep getting the underlying task reported failure on exit when trying to do disk permission or repair permissions. Also get cant install files in "/applications error when ever trying to install a driver or update. Help
-
I created a ear file wich contains a jar and war file. The jar contains an entity and session bean. The war file contains my junitee test case. When I deploy the file I can surf to the url and my test goes fine. When I move the file from the deploy d
-
Hi all, I have a scenario like this If i have 100 records in the file then in the idoc there will be 100 data segments to be created. if say 5 records were error then i need to create an idoc with 95 data segments. and ignore the 5 error records. ho
-
IPod will not charge...?
So, I just bought a reconditioned 20G 2nd Gen iPod. I installed the software and plugged in the iPod to the power adapter.... and all I get on the iPod is the sad iPod icon. It makes sounds while it's hooked up to the power cord, but the little sad i
-
PSE 7.0: Miniaturen
Ich habe folgendes Problem: Ich hatte erst die Demoversion von PSE7.0 installiert, alles funktionierte ohne Probleme. Als ich die Vollversion installiert habe (habe vorher wie in der Anleitung beschrieben, die Demoversion deinstalliert)erscheinen von