June 18, 201214 yr I came across this website the other day and was impressed with the functionality of the 'Work' section. http://kiskolabs.com/ If you click any of the links in the work section, a modal style window displays an image gallery. What intrigues me is that each work example division isn't visible, seems to occupy the same space and position on the page. But when you click on a client it brings their work to the forefront of the screen in a jquery expand style function. I would like to recreate this effect for my portfolio website. Does anyone know of a tutorial that could teach me this, or could anyone give me a few pointers as to how to achieve this wonderful effect. Cheers for any help.
June 18, 201214 yr Just create a huge, long webpage, so it would look like this (clicky-clicky). Then use jQuery to set the overflow to hidden and height to 0px on page load. You can then show/hide work using something like: $(document).ready(function(){ $("a.work").click(function(e){ e.preventDefault(); var rel = $(this).attr("rel").toLowerCase(); $("#work .work-item").stop().slideUp(300); $("#work ." + rel).stop().slideDown(300); }); }); With the following HTML: <a href="#work1" rel="your-work-item-1" class="work">Work item 1</a> <a href="#work2" rel="your-work-item-2" class="work">Work item 2</a> <!-- etc.. --> <div id="work"> <div class="work-item your-work-item-1">Work item 1 content/HTML in here</div> <div class="work-item your-work-item-2">Work item 2 content/HTML in here</div> <!-- etc.. --> </div> Edited June 18, 201214 yr by andyl
June 19, 201214 yr Author Thanks Andy for taking the time to give an example of this. I'm looking forward to testing this. I'll let you know how I get on shortly. Just create a huge, long webpage, so it would look like this (clicky-clicky). Then use jQuery to set the overflow to hidden and height to 0px on page load. You can then show/hide work using something like: $(document).ready(function(){ $("a.work").click(function(e){ e.preventDefault(); var rel = $(this).attr("rel").toLowerCase(); $("#work .work-item").stop().slideUp(300); $("#work ." + rel).stop().slideDown(300); }); }); With the following HTML: <a href="#work1" rel="your-work-item-1" class="work">Work item 1</a> <a href="#work2" rel="your-work-item-2" class="work">Work item 2</a> <!-- etc.. --> <div id="work"> <div class="work-item your-work-item-1">Work item 1 content/HTML in here</div> <div class="work-item your-work-item-2">Work item 2 content/HTML in here</div> <!-- etc.. --> </div>
Create an account or sign in to comment