Skip navigation
Currently Being Moderated

How to a SprySlidingPanelWidget inside another SprySlidingPanelWidget

Dec 8, 2011 8:58 AM

Tags: #help #dreamweaver #spry #css #menu #js #widget #panel #another #slides #include #sliding_panel #sliding #inside

Hi guys,

this is the page im working on:

www.pupr.edu/department/industrial/students.asp

 

I need to Create a Sliding Panels Widget INSIDE a panel of the Main Sliding Panels Pidget

 

Example

 

-Sliding Panel Widget 1 Menu-

[ Sliding Panel Widget 1 : Students ]

 

>panel 1: Titled Prospective

=panel content:

*Inside Sliding Panels Menu

*Inside Sliding Panels Widget 2( with 4 panels )

=/ends content panel 1:Prospective.

 

>panel 2: Titled Current

=panel content:

*Inside Sliding Panels Menu

*Inside Sliding Panels Widget 3( with 3 panels )

=/ends content panel 2: Current

 

[/Ends Sliding Panels Widget 1: Students]

 

 

I cant figure out why its nor working,

with what i have right now its as if its not recognizing it as a sliding panel.

I gave the "MiniSlidingPanel" ( Inside one ) its own css file, it uses the same js file as the main slide panels

i named it different than the main slidepanel in the same <script> on the bottom of the page

i really dont know what im doing wrong

 

HELP

 
Replies
  • Currently Being Moderated
    Dec 8, 2011 11:19 AM   in reply to krizcortes

    I'm not even sure Spry allows nested panels  - you may want to ask your question in the Spry forum here: http://forums.adobe.com/community/labs/spry

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 8, 2011 11:34 AM   in reply to krizcortes

    Yes, I think it would get confused as they both would use the same div id's. You may have to create a second CSS and JS file renaming elements so they are unique. I was able to insert a Vertical CSS menu into an Accorion content area and it worked fine, but there were no similar elements or divs.

     

    Also, try a search for accordion panel, maybe with jQuery. I did see a script out there for this and it had several variations, including nesting and vertical options - an accordion with only one tab is basically the same as a sliding panel.

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 8, 2011 11:49 AM   in reply to krizcortes

    Try this test code and adapt it to your needs:

     

    <!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>Untitled Document</title>

    <script src="SpryAssets/SpryCollapsiblePanel.js" type="text/javascript"></script>

    <link href="SpryAssets/SpryCollapsiblePanel.css" rel="stylesheet" type="text/css" />

    </head>

     

    <body>

    <div id="CollapsiblePanelRoot" class="CollapsiblePanelRoot">

      <div class="CollapsiblePanelTab" tabindex="0">Tab Root</div>

      <div class="CollapsiblePanelContent">

        <div id="CollapsiblePanel1" class="CollapsiblePanel">

          <div class="CollapsiblePanelTab" tabindex="0">Tab1</div>

          <div class="CollapsiblePanelContent">Content1</div>

        </div>

        <div id="CollapsiblePanel2" class="CollapsiblePanel">

          <div class="CollapsiblePanelTab" tabindex="0">Tab2</div>

          <div class="CollapsiblePanelContent">Content2</div>

        </div>

        <div id="CollapsiblePanel3" class="CollapsiblePanel">

          <div class="CollapsiblePanelTab" tabindex="0">Tab3</div>

          <div class="CollapsiblePanelContent">Content3</div>

        </div>

      </div>

    </div>

    <script type="text/javascript">

    var CollapsiblePanel1 = new Spry.Widget.CollapsiblePanel("CollapsiblePanel1", {contentIsOpen:false});

    var CollapsiblePanel2 = new Spry.Widget.CollapsiblePanel("CollapsiblePanel2", {contentIsOpen:false});

    var CollapsiblePanel3 = new Spry.Widget.CollapsiblePanel("CollapsiblePanel3", {contentIsOpen:false});

    var    CollapsiblePanelRoot = new Spry.Widget.CollapsiblePanel("CollapsiblePanelRoot");

    </script>

    </body>

    </html>

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 8, 2011 11:50 AM   in reply to krizcortes

    I would guess you wold need a second JS file as well. I don't know how that one is written, but others I've seen refer to specific CSS elements for different functions, especially the animation. It's a lot of code to go through!

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 8, 2011 12:23 PM   in reply to krizcortes

    The way it's configured you must have the panel tab (it's an essential element of the Spry Panel widget) - but yes, you could configure things so that the panels open via a menu system or have it so the main panel tab doesn't change height, but rather the content inside becomes visible (I think that's what you're asking for?).

     

    You may find it useful to review the Spry documentation found here: http://labs.adobe.com/technologies/spry/docs.html

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 8, 2011 1:04 PM   in reply to krizcortes

    Oh! In that case use the Spry Tabbed Panel widget and customize that. The apperance can be changed by editing the SpryTabbedPanels.css stylesheet, the functionality (i.e. which tab is open by default, etc.) can be done by reviewing the Spry documentation and adding in the allowable options in the JavaScript code on your page where you instantiate the widget (i.e. where the "var CollapsiblePanel1 = new Spry.Widget.CollapsiblePanel("CollapsiblePanel1", {contentIsOpen:false});" show up in your code on the page).

     

    Hope this helps. For further questions regarding Spry you probably should check in at the Spry forums: http://forums.adobe.com/community/labs/spry

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points