Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > JavaScript > BOOK: Beginning JavaScript and CSS Development with jQuery
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning JavaScript and CSS Development with jQuery
This is the forum to discuss the Wrox book Beginning JavaScript and CSS Development with jQuery by Richard York; ISBN: 9780470227794
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning JavaScript and CSS Development with jQuery section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old May 4th, 2012, 05:33 AM
Registered User
Points: 13, Level: 1
Points: 13, Level: 1 Points: 13, Level: 1 Points: 13, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2012
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Thumbs up Ch16 (tabs) corrections for later jQuery versions

Hi

The final tabs example works fine up to version 1.4.4 of jQuery and 1.6.0 of iQueryUI. Then each of these does it's own special thing to ruin the app (but exactly the same thing right up to the latest versions of both js libraries).

Some work and hints from http://docs.jquery.com/UI/Tabs led me to the working code below. Essentially the jQuery selector loses the "<" and the html has classes defined in the relevant divs (for the CSS to work) and updated links to the js files (hosted by google rather than local, in this case). Change the CSS link if you want to play with the look.

.html file (note, CSS is taken externally making the example .css obsolete in this case)...

<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min.js"></script>
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<script type='text/javascript' src='Figure 16-6.js'></script>
</head>
<body>
<div id="tmpTabExample" class="ui-tabs">
<ul>
<li>
<a href="#tmpTab-1"><span>First Tab</span></a>
</li>
<li>
<a href="#tmpTab-2"><span>Second Tab</span></a>
</li>
<li>
<a href="#tmpTab-3"><span>Third Tab</span></a>
</li>
<li>
<a href="tab.html" title="tmpTab-4"><span>Fourth Tab</span></a>
</li>
</ul>

<div id="tmpTab-1" class="ui-tabs-hide">
<p>
First tab is activated by default.
</p>
</div>
<div id="tmpTab-2" class="ui-tabs-hide">
<p>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Suspendisse
id sapien. Suspendisse rutrum libero sit amet dui...
</p>
</div>
<div id="tmpTab-3" class="ui-tabs-hide">
<p>
Lorem ipsum dolor sit amet...
</p>
</div>
<div id="tmpTab-4" class="ui-tabs-hide">
</div>
</div>
</body>
</html>


.js file...
$(document).ready(function() {
$("#tmpTabExample").tabs({
fx : {
opacity : 'toggle',
duration : 'fast'
}
});
});


Hope that helps others!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't seem to logout - CH16 Corewave BOOK: Professional ASP.NET 4 : in C# and VB 1 February 21st, 2012 10:13 AM
Can't seem to logout - CH16 Corewave BOOK: Beginning ASP.NET 4 : in C# and VB 1 February 20th, 2012 10:10 PM
Ch 4 Possible Corrections under Symfony: deejaydmk BOOK: Building PHP Applications with Symfony, CakePHP, and Zend Framework 0 November 5th, 2011 02:22 AM
Problem in IE 8 With Newer Versions of jQuery tknyc BOOK: Beginning JavaScript and CSS Development with jQuery 1 April 13th, 2011 03:32 PM
What is the protocol to summit corrections to the tbroom BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 5 August 16th, 2006 01:48 PM



All times are GMT -4. The time now is 08:07 AM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.