javascript - jQuery slide/fade functions -


I'm trying to modify this snippet:

  $ (document) .ready (function () {$ ('.shoscript'). Show (); $ ("div.content: not (.about)"). Hide (); $ ("Subnav a, .Mainnav a") Click (function () {// Remove possible circles ("Subnav a, .mainnav a"). RemoveClass ("active"); var href = $ (this) .attr ("href"); // Click the link hilight $ ('A [href =' '+ href +' "] '). AddClass (" active "); // possibly $ $ (" content ") shown Hide Hide (); // My Content $ ("DivContent: is (a [name = '" + href.replace ("#", "") + "'])"). Show ();});});  

It is such that when a link is clicked in .subnav or .mainnav it is swap doing this animates. I would like to use jQuery feedin / out, but I'm sure Is not that how do I apply it? The script is very specific so that the content can be shown from Menonov and the suburb, and whenever clicked, change the active class on both.

You can see what I'm saying here:

But it seems too much to get choppy.

The content quickly disappeared and the content quickly fading in the new, I was like window to slide down instead of content. I'm just using anchors like this:

  & lt; A name = "work" & gt;  

And then calling like this:

  & lt; A href = "#work" & gt;  

The window can go down, but because the material of the collector is not always enough to make an airplane which will allow the white space upwards to be visible colors So I think a slide would work better? Not sure how can I ask to slide the value of href to the click on the click?

In fact, any advice / help

I used to make those IDs on the devices which are the children of the material. In this way, you have to do a search on ID for any real extraction on complex expressions, not just for the content within the other. Allows animate I think the goal is to give you the most control. Lastly, you need a false withdrawal from your click handler, otherwise it is aimed at the functionality of the normal "jump" type. My script may look like this:

Content:

  & lt; Div class = "content" & gt; & Lt; Div id = "about" & gt; ... & lt; / Div & gt; & Lt; Div id = "work" & gt; ... & lt; / Div & gt; & Lt; Div id = "education" & gt; ... & lt; / Div & gt; & Lt; / Div & gt;  

The relevant part of your successor:

  $ (document) .ready (function () {$ (. Subnav a, .mainnav a) .click $ ('A href) ($' (selector, '. Content'). Length & gt; {$ ('& gt ;: visible', '. Content'). Slideshow ('Fast in (' fast ', function () {$ (This). ("Fast" ('fast', function) ($ (selector, '. Content').) '}}}}}}}}}}} Return false; });});  

Note that there is only a pseudo-code, so a simple C & P can work or not. But give it an idea


Comments

Popular posts from this blog

MVP, design question -

excel - Populate list via a bi-Condition -

iphone - How do I make a UIPickerView in a UIActionSheet -