Sliding panels navigation
Hello,
Got the sliding panels working fine however I am wondering if it is possible to change the navigation slightly.
Currently I am navigation between the pabels using previous and next buttons such as:
<a href="#" onclick="sp1.showNextPanel(); return false;">Next</a>
<a href="#" onclick="sp1.showPreviousPanel(); return false;">Previous</a>
However when you are at either the first panel and click previous or the last panel and next the buttons obviously don't do anything. Is there any code than can be added so that when you are at the first panel and click previous the last panel is navigated to and vise versa on the last.
Here is an example of what I mean:
http://www.panic.com/coda/
Any ideas?
Sure,
You can modify the SlidingPanels showNext and prev methods like this:
Spry.Widget.SlidingPanels.prototype.showPreviousPanel = function()
var index = this.getContentPanelIndex(this.currentPanel) - 1;
return this.showPanel(index < 0 ? this.getContentPanels().length -1 : index);
Spry.Widget.SlidingPanels.prototype.showNextPanel = function()
var index = this.getContentPanelIndex(this.currentPanel) + 1
return this.showPanel(index >= this.getContentPanels().length ? 0 : index);
And it should work
(either change them in SprySlidingPanels.js file, or just add them in a script block under the SprySlidngPanels script)
Similar Messages
-
Sliding Panels Navigation Question
I'm using the sliding panels widget to display some image
thumbnails. The problem is, I'm displaying about 5 or so at a time,
and the showNextPanel function only moves the whole thing over by
one thumbnail, making it necessary to click it five times to show
the next set of thumbnails.
Mangled test file can be found
here.Hello Luke,
I see there are 3 problems here you want/have to solve:
1. On page load you try to animate an element in page that
doesn't exists: thimbContainer. Every time you load the page in the
browser 3 alerts that the element is not found are generated by the
Spry Effects because the element isn't there. Please remove the
following code from the onload attribute attached to the body tag:
MM_effectAppearFade('thumbContainer', 2000, 0, 100, false);
2. The move next arrow doesn't work on the first click. The
problem appears because the SlidingPanel widget is instantiated
before the data to be putted in place in your page by the ds1 XML
DataSet. The regions are populated on page finish with the data but
the SlidingPanel widget will still try to animate the old,
incorrect element on the first click. To avoid this problem you'll
have to remove from page the SlidingPanel instantiation and
register a listener on the 'ticker' region update. Remove this
code:
<script type="text/javascript">
var sp = new Spry.Widget.SlidingPanels("ticker");
</script>
and just after the ds1 DataSet instantiation add the
following line:
Spry.Data.Region.addObserver('ticker',
{onPostUpdate:function(){sp = new
Spry.Widget.SlidingPanels("ticker");}});
3. To move the slider with the next 5 or prev 5 elements
you'll have to create your own functions that should add or
subtract from the current display index 5. The functions you look
for are:
function moveNextFive(){
if (!sp)
return;
var idx = sp.getContentPanelIndex(sp.currentPanel) + 5;
var maxPanels = sp.getContentPanels().length;
if (idx > maxPanels)
idx = maxPanels;
sp.showPanel(idx);
function movePrevFive(){
if (!sp)
return;
var idx = sp.getContentPanelIndex(sp.currentPanel) - 5;
var minPanels = 0
if (idx < minPanels)
idx = minPanels;
sp.showPanel(idx);
Please change the onclick for the previous and next arrows in
your Sliding Panels with calls to these 2 functions.
Regards,
Cristian -
How do i style an inactive navigation for sliding panel?
How can i style my navigation when they are not active(for example i would like to style my "previous" navigation arrow in a specific manner when there is no previous content to show)
With great difficulty. We must first determine the current panel and then, if the current panel is 0 then the previous button has to be changed and if the current panel matches the total number of panels, the next button has to be changed.
The following is a complete document that will work. Make sure you have all of the support (read JS) files in the allocated directory.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Sliding Panels Example.</title>
<script src="SpryAssets/SprySlidingPanels.js" language="javascript" type="text/javascript"></script>
<script src="SpryAssets/SpryDOMUtils.js" type="text/javascript"></script>
<link href="SpryAssets/SprySlidingPanels.css" rel="stylesheet" type="text/css" />
<style>
.SlidingPanelsContentGroup {min-height:0;}
.disabled {color:#F00;}
</style>
<script>
function slideNextPanel() {
sp1.showNextPanel();
var currentPanel = getCurrentPanel();
var panelCount = sp1.getContentPanelsCount()-1;
if (currentPanel==panelCount) {
Spry.$$("a#nextPanel").addClassName("disabled");
} else {
Spry.$$("a#previousPanel").removeClassName("disabled");
function slidePreviousPanel() {
sp1.showPreviousPanel();
var currentPanel = getCurrentPanel();
if (currentPanel==0) {
Spry.$$("a#previousPanel").addClassName("disabled");
} else {
Spry.$$("a#nextPanel").removeClassName("disabled");
function getCurrentPanel() {
var className = 'SlidingPanelsContent'; //change the className that is on all your content panels..
var panelCount = sp1.getContentPanelsCount();//get panel length
var current = sp1.getCurrentPanel(); //get current panel
var group = sp1.getContentGroup(); //get our group
var panelNumber = 0;
if(group.hasChildNodes()){
var j = 0;
for(var i = 0, l = group.childNodes.length; i < l; i ++){
if(group.childNodes[i].className && group.childNodes[i].className.search(new RegExp("\\b" + className + "\\b")) != -1){ // if it has SlidingPanelsContent class we found the correct node.
if(group.childNodes[i] == current){ // if it matches our current panel, we have a number
panelNumber = j;
return panelNumber;
j++; //increase our panelcounter
</script>
</head>
<body>
<a href="#" id="previousPanel" onclick="slidePreviousPanel();">Previous Panel</a> |
<a href="#" id="nextPanel" onclick="slideNextPanel()">Next Panel</a> |
<div id="panelwidget" class="SlidingPanels">
<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>
</body>
</html>
Gramps -
Sliding Panels Current Panel Navigation
Hi there,
I am quite new to using the spry framework, and my js skills
are not exceptionally strong. I am using a simple navigation menu
to activate the sliding panel widget. I am wondering if there is a
way to target the menu item so I can apply a different style it.
(Different style when panel is active)
Many thanks,
JarvisTake a look at this topic: http://forums.adobe.com/message/2174795#2174795
-
Possible to have two occurences of sliding panels in same location on page?
Hi, any help you guys could give me would be greatly appreciated.
I'm redesigning my portfolio page, and am trying to use the sliding panels widget for the two gallery areas. Ideally, when you click the links in the Design area on the left side navigation section, a Sliding Panels Content Group containing all the design work slides should appear on the right side of the page. When you click the links in the Illustration area, a Sliding Panels Content Group containing all the illustration work slides should replace the Design group in the exact same location on the page. Similar to links appearing in an iframe, but without having to click links and upload a page in the frame for each image.
I've managed to get the two different Content Groups to both be on the same page at the same time, like is done with the multiple examples at http://labs.adobe.com/technologies/spry/samples/slidingpanels/SlidingPanelsSample.html, but no luck getting a single Content Group to appear and then be replaced by the second group by clicking one of the links to the left.
Here's the page I'm working with, with only one of the Content Groups active:
http://www.susanmeyerart.com/redesign/
eta: I'm working with Spry Pre-Release 1.6.1.I think you can do this by using Spry Tabbed Panels as your container for the two sets of Sliding Panels. I have not tried this particular nesting before, but if you set up a test page, you can try it out.
Each set of Sliding Panels would appear as content on one of the Tabbed Panels. When each Tabbed Panel Tab is clicked, the corresponding Panel appears, holding your Sliding Panels.
This may not work, but, as they say...you don't know until you try!
Beth -
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 -
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. -
Sliding panels prev/next buttons
Using graphic buttons for previous and next navigation with Spry Sliding Panels, how can the 'previous' button be dimmed or hidden when you're on the first slide, and conversly, have the 'next' button dimmed or hidden when you're at the end of the slides? Ideally there would be a CSS class added to one button or the other to change states. Or can the Spry Fade Effect be used here to fade the buttons on and off?
The default Spry Widget has no functionality to indicate the current panel. I have created a small hack for that before. You might want to check out this post here: http://forums.adobe.com/message/2175472#2175472
Hopes this helps. -
Trying to come to grips with sliding panels and datasets
Hi there!
I've just started looking into Spry (love it so far!) but
having an issue combining the sliding panels widget and a Spry
dataset. The widget works fine and the dataset works fine when
seperate, but I come up against some problems when I combine them.
As a guide, I've been using the following page:
http://www.pixelz.co.uk/spryArticle.htm
(copy of the article in the Spry Zip file)
and using the Scenario 2 example at the end of the page.
Unfortunately, there were a few bugs in it (like a colon
where there should have been a semicolon and no titles in the
navigation <a> tags at the top) so I did a little debugging
and tied in my own dataset. The code that is running on this page (
http://www.pixelz.co.uk/spryTest.html)
looks like so:
quote:
<head>
<script language="javascript" type="text/javascript"
src="includes/xpath.js"></script>
<script language="javascript" type="text/javascript"
src="includes/SpryData.js"></script>
<script language="javascript" type="text/javascript" >
var dsTest = new Spry.Data.XMLDataSet("data/xmlTest.xml",
"specials/menu_item");
</script>
<script language="javascript" type="text/javascript"
src="includes/SprySlidingPanels.js"></script>
<link href="includes/SprySlidingPanels.css"
rel="stylesheet" type="text/css" />
</head>
<body>
<div spry:region="dsTest" spry:repeatchildren="dsTest">
<a href="#"
onclick="sp1.showPanel('detail{ds_RowID}');">Page
{ds_RowID}</a>
</div>
<div id="sPanel" class="SlidingPanels"
spry:region="dsTest">
<div class="SlidingPanelsContentGroup"
spry:repeat="dsTest">
<div id="detail{ds_RowID}"
class="SlidingPanelsContent">
<h3>{item}</h3>
<p>{description}</p>
<p><strong>{price}</strong></p>
</div>
</div>
<script language="javascript" type="text/javascript">
var sp1 = new Spry.Widget.SlidingPanels("sPanel");
</script>
</div>
</body>
The problem I'm having is that the panels don't change when
the links are clicked. It seems to pull in the data fine, but the
panels dont switch.
When I looked at the generated source, it doesn't look quite
right:
quote:
<body>
<div id="spryregion1" class="">
<a onclick="sp1.showPanel('detail0');" href="#">Page
0</a>
<a onclick="sp1.showPanel('detail1');" href="#">Page
1</a>
<a onclick="sp1.showPanel('detail2');" href="#">Page
2</a>
<a onclick="sp1.showPanel('detail3');" href="#">Page
3</a>
</div>
<div id="sPanel" class="SlidingPanels" style="overflow:
hidden;">
<div class="SlidingPanelsContentGroup" style="left: 0px;
top: 0px;">
<div id="detail0" class="SlidingPanelsContent
SlidingPanelsCurrentPanel">
</div>
</div>
<div class="SlidingPanelsContentGroup" style="left: 0px;
top: 0px;">
<div id="detail1" class="SlidingPanelsContent
SlidingPanelsCurrentPanel">
</div>
</div>
<div class="SlidingPanelsContentGroup" style="left: 0px;
top: 0px;">
<div id="detail2" class="SlidingPanelsContent
SlidingPanelsCurrentPanel">
</div>
</div>
<div class="SlidingPanelsContentGroup" style="left: 0px;
top: 0px;">
<div id="detail3" class="SlidingPanelsContent
SlidingPanelsCurrentPanel">
</div>
</div>
</div>
</body>
I'm not sure, but I think the repeating region is a bit
screwy, but I'm really not sure where to proceed from here.
Any help would be appreciated! Thanks!
GarethRight - fixed it!
<div class="SlidingPanelsContentGroup"
spry:repeat="dsTest">
<div id="detail{ds_RowID}"
class="SlidingPanelsContent">
should have read
<div class="SlidingPanelsContentGroup">
<div id="detail{ds_RowID}" class="SlidingPanelsContent"
spry:repeat="dsTest">
oh well... -
Sliding panels from data - single panel
I would like to use the spry sliding panels from data widget
with only 1 panel at a time. The sample has two at a time.
Most of the code makes sense, but every modification I try
breaks the next/previous navigation.I modified the code from the example for you, so now it works
with just one panel visible.
Changes are:
set the width of the wigdet en
slidingpanel class to 250 instead of 500.
var numberOfPanelsPerView = 1
remove all the
spry:if="{ds_RowNumber} % 2 == 0" attributes
change
onclick="sp1.showPanel('p{prevStartIndex}') to
onclick="sp1.showPreviousPanel()
change
onclick="sp1.showPanel('p{nextStartIndex}') to
onclick="sp1.showNextPanel()
This all leads to the following code
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml"
xmlns:spry="
http://ns.adobe.com/spry">
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=utf-8" />
<title>Sliding Panels Sample</title>
<script type="text/javascript"
src="../../widgets/slidingpanels/SprySlidingPanels.js"></script>
<script src="../../includes/xpath.js"
type="text/javascript"></script>
<script src="../../includes/SpryData.js"
type="text/javascript"></script>
<style type="text/css">
<!--
.widget {
/* width: 500px;*/
width: 250px;
height: 230px;
border: solid 1px black;
background-color: #CCCCCC;
.SlidingPanels {
/* width: 500px; */
width: 250px;
height: 230px;
overflow: visible;
position: relative;
float: left;
padding: 0px;
.SlidingPanelsContainer {
width:8000em;
height:230px;
position: absolute;
float:left;
margin: 0px;
padding: 0px;
.SlidingPanelsContent {
width: 250px;
height: 230px;
float: left;
.content {
width: 241px;
height: 200px;
float: left;
overflow: hidden;
padding: 4px;
border-right: solid 1px #999999;
.panelnav {
clear: both;
height: 42px;
.left {
text-align: left;
margin-left: 4px;
.right {
text-align: right;
margin-right: 4px;
-->
</style>
<link href="../../css/samples.css" rel="stylesheet"
type="text/css" />
<script type="text/javascript">
<!--
var ds1 = new
Spry.Data.XMLDataSet("../../demos/products/products.xml",
"/products/product");
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);
ds1.addObserver({ onPostLoad: function() {
var numberOfPanelsPerView = 1; //was 2
var rows = ds1.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>
</head>
<body>
<h3>Building a Sliding Panels widget with Spry
Data</h3>
<p>This sample creates a Sliding Panels widget by using
Spry Data to build the repeating markup. In this sample the content
panels are generated dynamically and the photo in each panel comes
from Spry Data. The text is static, which is just there for
example.</p>
<p>The content panel is generated in a Spry:repeat
region. An important thing in the panel widget is that each panel
should have a unique ID. This ID is generated with a Spry data
reference. Using the same method, the Panel links are generated the
same way, using the same data values. This ensures that the panel
links and IDs match up correctly. In this sample, the visible
window is twice as wide as the content panel. This allows for 2
panels to show at once. The links, therefore, need to show only
every other panel number. This will allow the panel to move by 2
content panels each time. To do this, a spry:if is used to only
display the even number panel numbers.</p>
<p>Note: Since this sample depends on Spry Data for the
content and markup, it will not degrade when JavaScript is turned
off. This sample shows how to construct this widget with Data.
Determine if this method fits your needs with degredation and
accessibility in mind. Also, this sample is more complicated only
because we are showing 2 panels at once and there are differing
lengths of text in the panels.</p>
<p>Page: <span spry:region="ds1"
spry:repeatchildren="ds1"> <a href="#"
onclick="sp1.showPanel('p{viewStartIndex}'); return
false;">{viewNumber}</a> </span></p>
<div class="widget">
<div id="apDiv1" class="SlidingPanels"
spry:region="ds1">
<div class="SlidingPanelsContainer">
<div id="p{ds_RowNumber}" class="SlidingPanelsContent"
spry:repeat="ds1">
<div class="content"> <img
src="../../demos/products/{boximage}" width="75" height="56"
hspace="5" vspace="5" align="left" alt="Sample Images from Spry
Data." />
<p>{desc}</p>
</div>
<div class="panelnav left"><a href="#"
onclick="sp1.showPreviousPanel(); return
false;"><<
Previous</a> <a
href="#" onclick="sp1.showNextPanel(); return false;">Next
>></a></div>
</div>
</div>
<script type="text/javascript">
var sp1 = new Spry.Widget.SlidingPanels("apDiv1");
</script>
</div>
</div>
</body>
</html> -
i have a page at
Text .
Navigation throught contents in firefox n IE 6 in the sliding panel
works fine but it freases IE7. I am using spry 1.6. in my opinion
it must be the javascript file,well any help will be greatly
appreciated.I have the same issue - IE7 Freezing with a sliding panel.
Works ok in other browsers including IE6.
Anyone have a solution for this or know if it is a Spry or
IE7 problem? -
I'm trying to adjust the easing of the sliding panel
animation. I'm hoping it will start up a little slower before
zipping off screen.
I'm trying to replicate the motion of this slider:
http://www.ndoherty.com/demos/coda-slider/1.1/
I think the needed changes are in this part of
SprySlidingPanels.js, but I can't figure it out. Can anybody help?
Thanks!!
Spry.Widget.SlidingPanels.PanelAnimator
= function(ele, curX, curY, dstX, dstY, opts)
this.element = ele;
this.curX = curX;
this.curY = curY;
this.dstX = dstX;
this.dstY = dstY;
this.fps = 60;
this.duration = 500;
this.transition =
Spry.Widget.SlidingPanels.PanelAnimator.defaultTransition;
this.startTime = 0;
this.timerID = 0;
this.finish = null;
var self = this;
this.intervalFunc = function() { self.step(); };
Spry.Widget.SlidingPanels.setOptions(this, opts, true);
this.interval = 1000/this.fps;
Spry.Widget.SlidingPanels.PanelAnimator.defaultTransition =
function(time, begin, finish, duration) { time /= duration; return
begin + ((2 - time) * time * finish); };
Spry.Widget.SlidingPanels.PanelAnimator.prototype.start =
function()
this.stop();
this.startTime = (new Date()).getTime();
this.timerID = setTimeout(this.intervalFunc, this.interval);
Spry.Widget.SlidingPanels.PanelAnimator.prototype.stop =
function()
if (this.timerID)
clearTimeout(this.timerID);
this.timerID = 0;
Spry.Widget.SlidingPanels.PanelAnimator.prototype.step =
function()
var elapsedTime = (new Date()).getTime() - this.startTime;
var done = elapsedTime >= this.duration;
var x, y;
if (done)
x = this.curX = this.dstX;
y = this.curY = this.dstY;
else
x = this.transition(elapsedTime, this.curX, this.dstX -
this.curX, this.duration);
y = this.transition(elapsedTime, this.curY, this.dstY -
this.curY, this.duration);
this.element.style.left = x + "px";
this.element.style.top = y + "px";
if (!done)
this.timerID = setTimeout(this.intervalFunc, this.interval);
else if (this.finish)
this.finish();Another change I made based on nice features of the Coda
Slider I referenced above:
Able to Link/Bookmark particular panels
We want to add an anchor hashes (#1, #2, #3 etc) to the url
for each panel, and then in the js file, extract the hash and make
it the default.
IN THE HTML:
<!-- Panel Navigation -- hashes added to url and return
now set to true -->
<a href="#1" onclick="sp2.showPanel(0); return
true;">1</a> |
<a href="#2" onclick="sp2.showPanel(1); return
true;">2</a> |
<a href="#3" onclick="sp2.showPanel(2); return
true;">3</a> |
<a href="#4" onclick="sp2.showPanel(3); return
true;">4</a> |
<a href="#5" onclick="sp2.showPanel(4); return
true;">5</a>
<!-- Panels themselves stay the same. This example shows
images. -->
<div id="example2" class="SlidingPanels" tabindex="0">
<div class="SlidingPanelsContentGroup">
<div id="ex2_p1" class="SlidingPanelsContent
p1"><img src="image1.jpg" ></div>
<div id="ex2_p2" class="SlidingPanelsContent
p2"><img src="image2.jpg"></div>
<div id="ex2_p3" class="SlidingPanelsContent
p3"><img src="images3.jpg"></div>
<div id="ex2_p4" class="SlidingPanelsContent
p4"><img src="images4.jpg"></div>
<div id="ex2_p5" class="SlidingPanelsContent
p5"><img src="image5.jpg"></div>
</div>
</div>
IN THE Spry.SlidingPanels.js FILE:
// Add this right before the part about default
// NEW STUFF HERE
// Grabs the number after the hash and makes it the default
// Note: had to add the hashes to the <a href> and set
return to true
this.defaultPanel = parseInt(location.hash.slice(1));
this.defaultPanel = this.defaultPanel-1;
// my hash numbers start at 1 but the array starts at 0, so
subtracted 1 from mine
// Back to regularly scheduled programming
// END NEW STUFF
Hope this helps someone. -
Is it possible to get one sliding panel to automatically display a web site?
I have a slinding panel widget with 6 content panes. One of the tabs is named "Online Help'. I would like the content pane for that tab to automattically display a form that is on a website.
The 'onclick' that is associated with the "Online Help" tab is calling the sliding panel number. If I repace it with an http address, the other panels continue to display but, that panel displays blank.
I have tried a CSS style tag for the panel that includes the http url in a background attribute. That is not working either.
I made a stab at spry:detailregion, but I don't know if a url can be a prameter in that element.
Does anyone have ideas on what I can try?
Thanks,
meileendoughertyWell, a url can be the contents of a data cell, but it will only give you a link, not the other website.
Although iframes are often considered tricky, I have not had bad luck with them. Put an iframe in your content cell, and use your other website as the source. You will have to give the iframe dimensions, or it will default to 'pretty small'.
Beth -
Background image instead of color for each sliding panel
I'm working with sliding panels and trying to add some style to the page. I have figured out how to put a different background color on each slide and even how to put a background image on the whole thing, but I cannot figure out how to use multiple images (one for each pannel). When I put the images in place of the colors it works fine in the Dreamweaver screen but totally disapears in a web browser. Here is the url: http://www.centerofdiscovery.com/the_center_of_discovery_home_page.html
any help would be great!Regarding getting the tabs to sit on top of the content panel, speaking generally here, make the containing div for both the tabs and the content panel to have a margin: 0 auto; setting.This is for horizontal alignment.
The blue rectangle can be belayed by setting border: none; on the specific rule that applies to the "a" links within that container. It is an indication that there is a link there.
Please rename the images that have word-spaces in their file names. Some browsers react badly to word-spaces.
I see that you have
<p>
</p><div class="slidingpanelandtab">
<blockquote>
<p><a onclick="sp1.showPanel(0); return false;" href="#"><img width="144" height="70" class="oneColFixCtrHdr" src="Images/panneltab.jpg"/></a><a onclick="sp1.showPanel(1); return false;" href="#"><img width="144" height="70" src="Images/panneltabb.jpg"/></a><a onclick="sp1.showPanel(2); return false;" href="#"><img width="144" height="70" src="Images/panneltaba.jpg"/></a><a onclick="sp1.showPanel(3); return false;" href="#"><img width="144" height="70" src="Images/panneltabc.jpg"/></a></p>
</blockquote>
Which sets off your "slidingpanelandtab" class div with an empty paragraph space <p></p> and then sets off the next section not only with <p></p> paragraph spacing but also with a <blockquote></blockquote>, which will by all rights indent that element.
I suggest that you get rid of the spurious paragraph tags and the blockquote; that should tighten up your spacing.
Beth -
How to Create a DVD from sliding Panels Slideshow.
I have the latest MacBook and iLife software.
I have created a 650 picture slideshow in Sliding Panels theme. It is 1.1 GB.
I have tried to (1) export and (2) Create iDVD through "Share". In both cases I get the message that I do not have sufficient Disc space. I have 23GB of available disc space.
I am probably doing something wrong but any CLEAR instructions?
ScottjohnwWelcome to the Apple Discussions. What system version are you running? As a precursor to trying the following fixes download and reapply the Mac OS X v10.6.3 v1.1 Update (Combo) updater if you're running Snow Leopard or the Mac OS X 10.5.8 Combo Update if you're running Leopard. Follow that with a repair of disk permissions. Then try the export again. If still not working continue with the fixes below:
First delete the iPhoto preference file, com.apple.iPhoto.plist, that resides in your User/Library/Preferences folder and try again.
If that doesn't help backup and launch iPhoto with the Command+Option keys depressed to rebuild the library. Select the last three options.
Click to view full size
Maybe you are looking for
-
How can I set Mail to show only one email at a time
Mail will group emails based on subject or sender and then I keep losing or missing emails because they get buried in a thread. Sometimes under another persons name! I'm old and easily confused. I just want one email per line. No grouping. Can't seem
-
How to insert a word document or an RTF document into RichTextEditor?
How to insert a word document or an RTF document into af:richTextEditor. I am using Apache POI for reading the Word document and getting its contents. I am able to display the whole content of the document except the table and image within the docume
-
Sysaux tablespace issue-missing sysux datafile
hi, I ve upgraded an database for 9i to 10g. The upgrade was sucessfull and the Db was in normal usage. Due to some functionality testing the database was restored to a state from the backup taken after upgrade. But while restoring the database i for
-
Oracle-10g RAC on VMware installed on Windows-7(Host)
Hi, My host OS is Windows-7. Docs. posted on this forum for RAC on VMware says: your Host OS should be Centos OS and in which you will install VMware and Client tools also. In this way u can clone another RAC2 machine. But I have Oracle VM Virtual Bo
-
Hi there.. I am just about to order myself a Zen Touch (which i'm quite excited about..yay)..but given that I really don't know that much about electronics, I was just wondering about the AC adapter since i'm going to be ordering from the US... Do i