Fallback for IE7 or less

Permalink Browser Info Environment
Magic Tabs uses a feature of jQuery that has quirks in Internet Explorer v7 or less. It is actually one of the many Internet Explorer bugs and in this case jQuery doesn't handle it as well as it does others. IE7 is an old browser version with very little use, so if you have a few site visitors who may be using IE7 or older and find that some tabbed content is not displaying correctly (rather than encouraging them to update their system), here is an alternative using Microsoft's conditional comments ( http://msdn.microsoft.com/en-us/library/ms537512(v=vs.85).aspx... ).

What you need to do is create a pair of complementary conditional comments, effectively an if-else structure, within the view.php of a tab template.
<?php   
defined('C5_EXECUTE') or die("Access Denied."); 
// before any template code
?>
<!--[if lte IE 7]>
<h3> 
<?php echo $heading;?>
</h3>
<![endif]-->
<![if (!IE) | ( gt IE 7)]>
<?php
//All the current body of the template
?>
<![endif]>


Its a good practice to never modify a template in place, but to copy/edit it to:

siteroot/blocks/jl_magic_tabs/templates/new_template_name/

Containing view.php and view.css (if there is one). It is only view.php that the above conditional comments are added to.

You will need to apply this template to ALL Magic Tabs blocks in the set, not just the first Magic Tabs block as you could with other templates.

Type: Discussion
Status: Archived
JohntheFish
View Replies:
JohntheFish replied on at Permalink Reply 1 Attachment
JohntheFish
Attached is a version of the Magic Tabs template 'jquery_ui_with_body' with the IE7 conditions added.
JohntheFish replied on at Permalink Reply
JohntheFish
For those concerned about older browsers, I recommend the browser update notification addon:
http://www.concrete5.org/marketplace/addons/scala-it-browser-update...

I use it on all my sites. This alerts users about IE6 and less, (but not IE7 by default).
JohntheFish replied on at Permalink Reply
JohntheFish
If anyone wants to see how Magi Tabs (or many other of my addons) work with IE7 or other browsers, fire up a copy of the browser you are concerned with and point it at:

http://www.c5magic.co.uk/

The home page uses Magic Tabs and many of my addons are used through the site.

concrete5 Environment Information

Browser User-Agent String

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.