it's works great, but i have a problem with divs which are inside at "content"--> inside "photo" for instance. I want to try more divs inside the buttons.when i write some divs inside photo no fading is shown and the content is not shown,..why? I think the poblem is the javascript code but im not smart enough to find and write javascript code to solve the problem..can someone help me?
// each button div MUST have a \"xx-button\" and the target div must have an id \"xx\" var idToLoad = $clicked.attr(\"id\").split('-');
//we search trough the content for the visible div and we fade it out $(\"#content\").find(\"div:visible\").fadeOut(\"fast\", function(){ //once the fade out is completed, we start to fade in the right div $(this).parent().find(\"#\"+idToLoad[0]).fadeIn(); }) }
//we reset the other buttons to default style $clicked.siblings(\".button\").animate({ opacity: 0.5, borderWidth: 1 }, 600 );
}); });
and here is something i tried to build... see at photo!
This is just a work around, but how necessary is it to have the div inside the div? What is it you are trying to do? I am fairly certain you don't need an extra div to achieve that.
here i have tried to use more than one html side, and i put the content/the sliding menu directly inside from the div,but there is no fading and the menus are jumping.
but i think this is not a good idea, i want to call the specials divs with content in one html side. like here:
Why don't you try making the div.#slider a span instead. and also try making the #slider a .slider. I'm not able to change the javascript with firebug :( or maybe I can, but I'm still a noob with firebug lol.
Using the fading jquery menu/content code from here:
http://css-tricks.com/learning-jquery-f ... g-content/
it's works great, but i have a problem with divs which are inside at "content"--> inside "photo" for instance. I want to try more divs inside the buttons.when i write some divs inside photo no fading is shown and the content is not shown,..why? I think the poblem is the javascript code but im not smart enough to find and write javascript code to solve the problem..can someone help me?
the javascript code:
and here is something i tried to build... see at photo!
the divs about , contact, design works but div in div not...
thanks for help
spuncky
well, i want to add a sliding menu, also from this side: ;)
http://css-tricks.com/examples/MovingBoxes/
i tried to add this code inside my divs but the content is not fading out/in.
here you can see it:
http://mindmaze.de/hannes/Portfolio2009/design.html
here i have tried to use more than one html side, and i put the content/the sliding menu directly inside from the div,but there is no fading and the menus are jumping.
but i think this is not a good idea, i want to call the specials divs with content in one html side. like here:
the div photo is called from javascript code, but the div inside is not recognized.
and this is how i look like if i add the menu inside the div:
buuuut it doesn't work...merry christmas
Edit: Try this script: http://www.stunicholls.com/various/tabbed_pages.html
You can add the jquery fade on click ontop of that. And there shouldn't be any div restrictions or anything.
I think instead of this ^ is better to write like this:
Am I right? This question is for the specialists of jQuery.