Light Box Plugin A lightbox is a jquery plugin that
allows you to view an image in full when clicking on it in a nice styled
window. This is a very common and well known plugin, so I thought I should
cover it. <link rel="stylesheet"
type="text/css" href="css/jquery.lightbox-0.4.css"
media="screen" /> add in the following HTML <a
href="/images/designImage.png" class="lightbox" ><img
border="0" src="images/designImage.png"
width="50" height="50" /></a> and then the javascript $(document).ready(function(){ What's
happening is we are setting up the class lightbox to run the lightbox function
and we declare the class in the anchor tag in the HTML Tabbed Content Area Lets have a go at making a tabbed
content area, this tutorial requires you to have the jquery framework
installed. To do this we are going to make it using the heading tabs using the
unordered list tag and the content will be wrapped in divs, As the user clicks
on a new tab the content will fade in and out. <div id="wrapper"> and then add the following CSS body this is going to be our basic shape so now add the HTML for the tabs and content <ul class="tabs"> This is going to work by fading in
and out the div content tabs. Each of these represents different content and
will be shown/hidden based on user input. ul.tabs this is pretty standard styling we
set the width of the list to 300px to span is across. remove style formatting
made by default and set each li to float left so they are next to each other.
The active class is the styling for the tab that is currently selected. The tab
container is the containing element over the main content. $(document).ready(function() { Okay so we hide all the content and then fade in the first element in the tab content which is the first tab, now lets add in the event of when a tab is pressed and put this new javasvcript code just after the fade in so we are still inside the document ready. $("ul.tabs
li").click(function() { Okay so
whats happening here is when we click on the tab at the top we remove the
active class from the current tab and add it to the tab we just pressed |