The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Help with a Javascript Slider

View previous topic View next topic Go down

Help with a Javascript Slider

Post by ShadesOfJay on April 13th 2014, 4:48 am

http://help.forumotion.com/t98477-how-to-install-vertical-info-panel-slide-with-jquery?highlight=jquery




I installed this on my test forum as shownhere
But, I wannt know how I would add more than one of the bars?

ShadesOfJay
Forumember

Female Posts : 35
Reputation : 1
Language : English

http://www.virtuousrealms.board-directory.net

Back to top Go down

Re: Help with a Javascript Slider

Post by SLGray on April 13th 2014, 7:23 am

Bars?


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.


SLGray
Administrator
Administrator

Male Posts : 36644
Reputation : 2443
Language : English
Location : United States

http://ztwds.forumotion.com/

Back to top Go down

Re: Help with a Javascript Slider

Post by ShadesOfJay on April 13th 2014, 7:26 am

Here

Where it says Info.


I wanna know how to make more of those with the code. Do I duplicate it and re-position via css?

ShadesOfJay
Forumember

Female Posts : 35
Reputation : 1
Language : English

http://www.virtuousrealms.board-directory.net

Back to top Go down

Re: Help with a Javascript Slider

Post by mangaka on April 13th 2014, 1:02 pm

You see this code?
Code:
<a class="trigger" href="#">infos</a>

Just add it again and again. Example :

Code:
<a class="trigger" href="#">infos</a>
<a class="trigger2" href="#">blablabla</a>

And add this code after you add the code <a class="trigger" href="#">blablabla</a> :

Code:
<div class="panel2">
  <h3>Sliding Panel</h3>
  <p>Here's our sliding panel/drawer made using jQuery with the toggle function and some CSS3 for the rounded corners</p>
  <p>This panel could also be placed on the right. This could be particularly useful if, <a href="http://spyrestudios.com" title="SpyreStudios">like me</a>, you have a left-aligned website layout.</p>

  <h3>A Little Something About Me</h3>
  <img class="right" src="images/jon_image.jpg" alt="Jon Phillips" />
  <p>My name's Jon, I'm a freelance designer, blogger, musician. I run SpyreStudios and I specialize in WordPress blogs, CSS, XHTML and PHP</p>
<div style="clear:both;"></div><div class="columns">
  <div class="colleft">
  <h3>Navigation</h3>
      <ul>
        <li><a href="http://spyrestudios.com/" title="home">Home</a></li>
        <li><a href="http://spyrestudios.com/about/" title="about">About</a></li>
        <li><a href="http://spyrestudios.com/portfolio/" title="portfolio">Portfolio</a></li>
        <li><a href="http://spyrestudios.com/contact/" title="contact">Contact</a></li>
        <li><a href="http://spyrestudios.com" title="blog">Blog</a></li>
      </ul>
  </div>

  <div class="colright">
      <h3>Social Stuff</h3>
      <ul>
        <li><a href="http://twitter.com/jophillips" title="Twitter">Twitter</a></li>
        <li><a href="http://designbump.com/user/147" title="DesignBump">DesignBump</a></li>
        <li><a href="http://digg.com/users/jophillips" title="Digg">Digg</a></li>
        <li><a href="http://delicious.com/jon.phillips" title="Del.Icio.Us">Del.Icio.Us</a></li>
        <li><a href="http://designmoo.com/users/jonphillips" title="DesignMoo">DesignMoo</a></li>
      </ul>
  </div>
</div><div style="clear:both;"></div>

</div>

And modify the JS code into this :

Code:
$(document).ready(function(){
$(".trigger").click(function(){
$(".trigger2").click(function(){
 $(".panel").toggle("fast");
$(".panel2").toggle("fast");
 $(this).toggleClass("active");
 return false;
});
});
});

And change the CSS into this :

Code:
.panel {
position: absolute;
top: 50px;
left: 0;
display: none;
background: #000000;
border:1px solid #111111;
-moz-border-radius-topright: 20px;
-webkit-border-top-right-radius: 20px;
-moz-border-radius-bottomright: 20px;
-webkit-border-bottom-right-radius: 20px;
width: 330px;
height: auto;
padding: 30px 30px 30px 130px;
filter: alpha(opacity=85);
opacity: .85;
}

.panel p{
margin: 0 0 15px 0;
padding: 0;
color: #cccccc;
}

.panel a, .panel a:visited{
margin: 0;
padding: 0;
color: #9FC54E;
text-decoration: none;
border-bottom: 1px solid #9FC54E;
}

.panel a:hover, .panel a:visited:hover{
margin: 0;
padding: 0;
color: #ffffff;
text-decoration: none;
border-bottom: 1px solid #ffffff;
}

a.trigger{
position: absolute;
text-decoration: none;
top: 80px; left: 0;
font-size: 16px;
letter-spacing:-1px;
font-family: verdana, helvetica, arial, sans-serif;
color:#fff;
padding: 20px 40px 20px 15px;
font-weight: 700;
background:#333333 url(http://i45.servimg.com/u/f45/15/95/60/34/plus12.png) 85% 55% no-repeat;
border:1px solid #444444;
-moz-border-radius-topright: 20px;
-webkit-border-top-right-radius: 20px;
-moz-border-radius-bottomright: 20px;
-webkit-border-bottom-right-radius: 20px;
-moz-border-radius-bottomleft: 0px;
-webkit-border-bottom-left-radius: 0px;
display: block;
}

a.trigger:hover{
position: absolute;
text-decoration: none;
top: 80px; left: 0;
font-size: 16px;
letter-spacing:-1px;
font-family: verdana, helvetica, arial, sans-serif;
color:#fff;
padding: 20px 40px 20px 20px;
font-weight: 700;
background:#222222 url(http://i45.servimg.com/u/f45/15/95/60/34/plus12.png) 85% 55% no-repeat;
border:1px solid #444444;
-moz-border-radius-topright: 20px;
-webkit-border-top-right-radius: 20px;
-moz-border-radius-bottomright: 20px;
-webkit-border-bottom-right-radius: 20px;
-moz-border-radius-bottomleft: 0px;
-webkit-border-bottom-left-radius: 0px;
display: block;
}

a.active.trigger {
background:#222222 url(http://i45.servimg.com/u/f45/15/95/60/34/minus12.png) 85% 55% no-repeat;
}

.columns{
clear: both;
width: 330px;
padding: 0 0 20px 0;
line-height: 22px;
}

.colleft{
float: left;
width: 130px;
line-height: 22px;
}

.colright{
float: right;
width: 130px;
line-height: 22px;
}

ul{
padding: 0;
margin: 0;
list-style-type: none;
}

ul li{
padding: 0;
margin: 0;
list-style-type: none;
}

.panel2 {
position: absolute;
top: 50px;
left: 0;
display: none;
background: #000000;
border:1px solid #111111;
-moz-border-radius-topright: 20px;
-webkit-border-top-right-radius: 20px;
-moz-border-radius-bottomright: 20px;
-webkit-border-bottom-right-radius: 20px;
width: 330px;
height: auto;
padding: 30px 30px 30px 130px;
filter: alpha(opacity=85);
opacity: .85;
}

.panel2 p{
margin: 0 0 15px 0;
padding: 0;
color: #cccccc;
}

.panel2 a, .panel2 a:visited{
margin: 0;
padding: 0;
color: #9FC54E;
text-decoration: none;
border-bottom: 1px solid #9FC54E;
}

.panel2 a:hover, .panel2 a:visited:hover{
margin: 0;
padding: 0;
color: #ffffff;
text-decoration: none;
border-bottom: 1px solid #ffffff;
}

a.trigger2{
position: absolute;
text-decoration: none;
top: 80px; left: 0;
font-size: 16px;
letter-spacing:-1px;
font-family: verdana, helvetica, arial, sans-serif;
color:#fff;
padding: 20px 40px 20px 15px;
font-weight: 700;
background:#333333 url(http://i45.servimg.com/u/f45/15/95/60/34/plus12.png) 85% 55% no-repeat;
border:1px solid #444444;
-moz-border-radius-topright: 20px;
-webkit-border-top-right-radius: 20px;
-moz-border-radius-bottomright: 20px;
-webkit-border-bottom-right-radius: 20px;
-moz-border-radius-bottomleft: 0px;
-webkit-border-bottom-left-radius: 0px;
display: block;
}

a.trigger2:hover{
position: absolute;
text-decoration: none;
top: 80px; left: 0;
font-size: 16px;
letter-spacing:-1px;
font-family: verdana, helvetica, arial, sans-serif;
color:#fff;
padding: 20px 40px 20px 20px;
font-weight: 700;
background:#222222 url(http://i45.servimg.com/u/f45/15/95/60/34/plus12.png) 85% 55% no-repeat;
border:1px solid #444444;
-moz-border-radius-topright: 20px;
-webkit-border-top-right-radius: 20px;
-moz-border-radius-bottomright: 20px;
-webkit-border-bottom-right-radius: 20px;
-moz-border-radius-bottomleft: 0px;
-webkit-border-bottom-left-radius: 0px;
display: block;
}

a.active.trigger2 {
background:#222222 url(http://i45.servimg.com/u/f45/15/95/60/34/minus12.png) 85% 55% no-repeat;
}

I doesn't test it, but hope it works lol. Razz

mangaka
Forumember

Female Posts : 121
Reputation : 5
Language : Indonesia
Location : Well

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum