JQuery :: Slide Effect - Different DIVs For Each Menu Item?

Jan 9, 2010

I want a menu at the top of the page. When I press a button in the menu the content of the page slides up, the content changes and it slides down. I've done this so far, but how can I do a more dynamic solution without having different divs for each menu item?

JS:
<script type="text/javascript" src="[URL]"></script>
<script type="text/javascript">
jQuery(document).ready(function(){
$('#f1').click(function() {
a("1");
});
$('#f2').click(function() {
a("2");
});
$('#f3').click(function() {
a("3");
});
function a(info) {
$('#content').slideUp("normal");
document.getElementById('content').innerHTML = info;
$('#content').slideDown("normal");
};
});
</script>

HTML:
<div id="f1"><a href="#">Menu 1</a></div>
<div id="f2"><a href="#">Menu 2</a></div>
<div id="f3"><a href="#">Menu 3</a></div>
<div id="content">Chose something in the menu</div>

View 5 Replies


ADVERTISEMENT

JQuery :: Get Rid Of The Slide Effect On A Basic Horizontal Menu?

Jun 30, 2009

How can I get rid of the slide effect on a basic horizontal menu? I love the way the "basic" example works but I can't mimic it without having the text all slide to right and re-sizing the box.

View 2 Replies View Related

JQuery :: Script To Slide Left A <li> Item From A Menu And Making Links Clickable?

Jun 11, 2010

what I'm trying to do is to have a vertical menu where one of the list items if triggered (click or mouseover are both fine) moves to the right and then slides down a submenu with other 4 lists items. I got this working while I was just trying this effect alone thanks to this script:

<script type="text/javascript" src="jquery-1.4.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){

[code]....

View 1 Replies View Related

JQuery :: Drop Down Slide Menu And A Parralex Slide Gallery - Submenu Of The Slide Down Menu Does Not Work

Feb 2, 2011

I'm having a little trouble with 2 differentJS scripts. I have a drop down slide menu and a parralex slide gallery. Both work on separate pages and puton the same page they still work however the submenu of the slide down menu does not. if I remove the style sheet that belongs to the gallery

Then the munu works, however (obviously) the page layout goes wrong. if i remove<h1 class="title">Alex Holland Perspective</h1> the menu works however page layout goes wrong andI loose my header

Here is the code.

View 4 Replies View Related

Page Slide Effect With Stationary Menu?

Oct 18, 2011

I was wondering if jQuery or mootools has a set of scripts that creates a page slide effect with a stationary menu? What I mean is instead of loading a page when you click a link, all pages of the website are loaded at first, and then when a link is clicked, the corresponding page slides onto the screen. The navigation menu remains unchanged (except for dropdown menus) throughout everything. This is a perfect example of what I'm looking for: [URL] I tried to search for this but didn't come up with too many great results, and I searched the jQuery documentation and wasn't able to find a slider feature.

View 2 Replies View Related

Ajax :: Jquery Form With Slide In Effect Of New Div - Hide The Last Div Then Slide Down

Oct 19, 2011

I'm making a form with some fields. Once the form is submitted it updates the page with a new div containing the data entered without refreshing. Im using jquery form plugin. What I'd like to achieve is the new div(.record) to .slideDown. I guess I need to somehow specify the exact div by giving it an id or number. I'm not sure and why im here.

At the moment when i submit all of the divs(.record) are hidden with .hide, then they all slide down with .slide. Best i can understand is to hide the last div then slide down. But again.. I don't know how to specify to only slide down the last div added and not the current .record divs on the page.

[Code]...

View 3 Replies View Related

JQuery :: Toggle Slide Open Hidden Div And Slide Close Open Divs At Same Time

Jun 26, 2010

Trying to learn the basics... Here is a script for three toggle buttons that each when clicked open their corresponding divs. Fine. Now how does one go about automatically closing an open div when clicking on a new 'toggler' that opens it's div? I see other posts about this very question, but I'm just not grasping the logic.

jQuery(document).ready(function($) {
$("#toggle1").click(function () {
$("#toggle1div").toggle("drop", {direction:"right"}, 500);
});
$("#toggle2").click(function () {

View 3 Replies View Related

Slide Up/Slide Down Using Multiple Divs

Nov 9, 2009

I'm trying to get a mootools plugin to work with a slide in/slide out javascript using multiple divs. Here's the page: [url] The mootools code (Noobslide) slides a main image on the right when you click thumbnails on the left, which are wrapped in a thumb mask using CSS. The first row of thumbnails works perfectly, but when it's passed on to the next div the mask isn't passed on and the effect breaks down.

Here's the html:

The javascript:

The CSS:

View 1 Replies View Related

JQuery :: Toggle Effect - Get The Captions To Slide

Nov 9, 2010

I want to toggle the text in this example: [url]

I am using these sites for the toggle effect: [url] [url]

My javascript looks like this :

My css looks like this:

This is what the html looks like:

I'm trying to get the captions to slide but the <p id="caption"> does not want to slide..when I added in the "ddsfdsfdfg" that slides but not the "p id"..how to get this working.

View 2 Replies View Related

JQuery :: Image Slide Effect On Page Load?

Jan 14, 2011

I want to slide an image or a page on page load..the below is an example

[URL]

View 2 Replies View Related

JQuery :: Create A Specific Menu Where Toggle A Clicked Menu Item

Sep 30, 2010

I am trying to create a specific menu using jQuery where i want to toggle a clicked menu item. I used toggleClass to accomplish this. All fine and well, but what i want is that once i click a menu item, the previously clicked item should have the active state/class toggled off.. The menu is variable. (I tried and tried and searched all over the internet, but i cannot find it... spent 5 hours trying to combine various selectors and if/else statements, but it did'nt work.)

View 1 Replies View Related

Vertical Menu - Height Of The Second Level Menu Results In Their Being Gaps In Between Each Menu Item

Jun 3, 2009

The problem is that the height of the second level menu results in their being gaps in between each menu item so that as you move your mouse down the second menu items it quickly closes again. scripting novice fix this by telling me which variable I need to change either in the Java script or the CSS files.

View 2 Replies View Related

JQuery :: Multiple Divs With Same Effect?

Jan 26, 2011

On my site I have a news page, where users can read part of the news (trimmed with php) and then they click "Read more" to see the full news item. That item then comes up in a popup (using jQuery of course) and should be displayed. To get this to work I'm usingthisby including it like so:

<script type="text/javascript" src="includes/jquery.colorbox.js"></script>

The jQuery code looks like so:

$('.open').colorbox({width:"50%", inline:true, href:"#news"});

This all works great with that one div. The problem is, my news will be coming from a MySQL-query via PHP in a while-loop and I need this effect applied to every single news item. What I tried is to do this:

while($row = mysql_fetch_assoc($rs)) {
echo '<a class="open" href="#">Read more</a>';
echo '<div id="wrapper" style="display:none">';

[code]....

how do I make this work? How do I make jQuery open only the news item I'm clicking on? I know it could possibly be done with (this) and maybe children() or something like that? But I'm totaly lost at the momeny, I've tried loads of stuff with the pieces mentioned above but can't get it to work and most times I just "break" the jQuery and the popup won't even come up at all.

View 4 Replies View Related

JQuery :: Add Slide Effect When Switching Images With External Trigger?

Apr 11, 2011

I am trying to achieve a relatively simple effect but having a hard time. I have the code to swap the images displayed in a particular div with an external trigger but want to add a slide effect to the new images that loads upon activating the trigger. The code I have so far is:

<script type="text/javascript">
function changeBelt(beltName,BeltHolder)
{
var obj = document.getElementById(BeltHolder);

[Code].....

View 4 Replies View Related

JQuery :: Cycle Plugin - Multiple DIVs Per Slide

Sep 21, 2010

I've been using the jQuery Cycle Plugin now for a variety of clients and feel pretty comfortable with implementing it and how it works. I rarely have any difficulties and it always seems to shave time off my projects. Its really is an awesome plugin that I am extremely grateful for. That being said I'm having a little difficulty with a more involved implementation on a personal project. [URL]. The plugin is working correctly - but not ideally.

Each image and title you see is a callout for a blog post. The posts are automatically added by calling the WordPress theme's "loop" - a PHP function loading the information and images from the last several posts written - then it displays each post's featured images, titles, and other info inside divs labeled "post". Afterward, the jQuery cycle plugin uses all the "post" div's to create a great user-interactive recent blog-post slider - using (my favorite) vertScroll effects.

What I'm looking for is a way to display 2-3 posts at a time instead of just 1. I've seen people have 2-3 images displaying per scroll by adding two-three images into a div - and then having that div (with more divs) cycle. What prevents me from doing something like that here is the fact that the list of blog-posts is dynamically populated by PHP. There isn't a way (I know of) to insert a </div> after 2-3 posts and then open a new <div> for the next 2-3 so that the cycle plugin knows where to stop the scroll content.

View 4 Replies View Related

JQuery :: Create A Fade In Out Effect Of Three Divs In The Same Place?

Feb 14, 2011

I'm trying to create a fade in out effect of three divs in the same place, but for some reason the effect is duplicating itself for two of the divs.

<div id="click1">click1</div>
<div id="click2">click2</div>
<div id="click3">click3</div>
<div id="content1" class="vis">This is the content initially</div>

[Code]....

View 2 Replies View Related

JQuery :: Step Carousel (Removing Fast Forward/Rewind Effect When Clicking Back On The First/Last Slide)?

Aug 10, 2011

i'm New to JQuery and I recently had a problem with encorporating a transition at the beginning and end of my carousel. I found that by default it would Fast Forward/Fast Rewind through all the images at the ends, rather than just jump to the slide and wrap.

I've managed to solve the issue (bar a transition effect from the last slide back to the first) it now jumps to slide one, rather than rewinding through all the images. However (and i know this sounds silly) but i'm having trouble doing the reverse. I'll add both the zip file to show a working model if interested and also post the 2 relevant functions :)

[Code]...

View 12 Replies View Related

Imitating Simultaneous Slide Effect?

May 23, 2010

in a non-Flash enviroment; while waiting for images and style information, I've been working on a prototype to get the behavior down. So far this is what I've come up with.

[URL]

I'm using the JQuery UI "Slide" plugin to try to get the image of a particular div to slide in from the left and the content to slide in from the right. However, at the moment I'm getting a weird jump effect (at least in Firefox and Chrome; I have not yet tested in IE) that I *think* has to do with the float on the left-hand image but I'm not sure. Does anyone know how I might get rid of this, or if there's a better/more efficient way to achieve this effect?(For the record, it *is* the same image for all four divs at the moment; I was just working on the behavior so I didn't spend a lot of time on it; it's a placeholder.)

View 2 Replies View Related

Toggle The Slide Effect Using Scriptaculous?

Oct 4, 2010

I'm trying to toggle the slide effect using scriptaculous, but the toggle slide isn't working at all.

Here is my code:

Code:

<script language="javascript" src="prototype.js"></script>
<script language="javascript" src="scriptaculous.js"></script>
<a href="#" onclick="Effect.toggle('toggle_slide1', 'slide'); return false;"><span class="header"> Master Station </span></a></div>

[Code]....

View 3 Replies View Related

JQuery :: Hiding/showing Divs - Hide The Currently Shown Div And Then Slide In The Div Associated With The Button Clicked?

Oct 7, 2010

I awhen it comes to "developing" jQuery but I am trying to do something that is seemingly something simple but I can't for the life of me, figure out the best way to do it.

http:[url].....

Here, you'll see the area below the navigation that has five buttons which are supposed to help scroll between the five associated divs.All I want to do is hide the currently shown div and then slide in the div associated with the button clicked.http:[url].....Here is what the animation is SUPPOSED to look like but the problem is is that the correct one uses Prototype and I am trying to use only one library and jQuery is the most suitable because I use it for other effects in the site and jQuery and Prototype obviously don't mesh well.

View 3 Replies View Related

OnHover Slide-out Menu Won't Slide

Aug 24, 2010

Im a starting graphic designer, 21 yrs of age and just rolling into this webdesign industry. Ive come a long way, do have some knowledge.. but when it comes to complicated things like JS I often visit knowledgeable forums like these.

I hope I can contribute into making this community richer.

Now, Ive implemented this slide out menu succesfully before, only now it seems that ive mistaken somewhere. The menu just pops out instead of sliding out like it should.

Code:
<script type="text/javascript">
$(document).ready(function(){
var docked = 0;
$("#dock li ul").height($(window).height());

[Code]....

And if you want to see a working example of how it should be look here.

View 4 Replies View Related

Collapsible Menu Code - Clicking On The Menu Item Will Bring Them To The Specific Page?

Mar 8, 2010

provide me with code to make a collapsible menu? What I'm looking for is a vertical menu, that will open up the sub-categories upon a mouseover. Clicking on the menu item will bring them to the specific page. Oh, and this might not matter, but I'd prefer if I was able to style the menu to fit with my site theme.

View 2 Replies View Related

What Would Be The Best Color To Match If The Menu Background Is Left As It Is When Hovering On A Menu Item

Jun 16, 2011

Am working on a web template similar to this one: [URL] and would like to change the hover color for the menus (in blue with white text). What would be the best color to match if the menu background is left as it is when hovering on a menu item?

View 2 Replies View Related

Drop Down Menu - Over The Sub Menu The Background Image Of The Top Item Disappears

Feb 11, 2011

I'm building a drop down menu like [URL] or [URL] or [URL] the effect I'm trying to achieve is to have the top menu item showing a background image via css and create a stylized design with the sub-menu. Using CSS when I hover over the sub menu the background image of the top item disappears. So I'd like some guidance with javascript on how to keep the back-image while hovering on the sub menu.

View 1 Replies View Related

Sliding Divs And Get The Toggle Button To Slide With It But Not Disappear?

Feb 5, 2011

I have a script that will slide a div up from the bottom of the page. The toggle button for this div however is going to be right on top of the sliding div. But, when the button is pressed and the div starts to slide down, the script hides the button. Here's an example... [URL] How can I get the toggle button to slide with it, but not disappear?

View 7 Replies View Related

JQuery :: Slide-down Vertical Menu?

Feb 26, 2010

This is my HTML code:

Code:

<div id="vnav">
<ul>
<li>
<a href="index.php">Home</a>

[code]....

It's basically a vertical list of links, with more specific links hidden inside categories. When you click a category, the specific links should slide down. This is the JS/jQuery part:

Code:

<script type="text/javascript">
function slidey() {
$("#vnav ul li ul").slideDown("slow");

[code]....

so the problem here is that when you click a category, it expands ALL sub-categories and it's supposed to just expand the sub-categories related to the section clicked.

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved