views:

703

answers:

3

I have used Jquery Pikachoose plugin on my page to display some images as slideshow.

But in IE, instead of image to slide, it opens the image in the same page in full view.

AND the funny thing is, If before the script opens the image, if I change the slide myself by clicking a thumbnail, then from this point and onwards, it works fine.

How to fix this

I fetch the image name from the database and display like the following

echo
'<div id="slideShow" class="sublayout pikachoose">
    <ul id="pikame">';
        while($row = mysql_fetch_array($result)) {
            extract($row);
            echo
            '<li>
                <a href="images/slideshow/'.$image.'">
                        <img src="images/slideshow/th_'.$image.'" title='.$title.' alt='.$title.'/>
                </a>
                <span>'.$title.'</span>
            </li>';
        }
    echo
    '</ul>
</div>';

This is my pikachoose options in pikachoose.js

    var defaults = {
        show_captions: true,
        auto_play: true,
        show_prev_next: true,
        slide_speed: 5000,
        thumb_width: 26,
        thumb_height: 20,
        buttons_text: { play: "", stop: "", previous: "Previous", next: "Next" },
        delay_caption: true,
        user_thumbs: false,
        transition:[-1],
        IESafe: true
    };

I initialize the plugin using this (also in seperate file)

$(document).ready(function (){ $("#pikame").PikaChoose({auto_play:true, IESafe: true}); });

Works fine in other browser

Findings

  1. If I remove the <a> the <img> , this stops the script from opening the image
  2. The demo provided in the official page also behaves like this
+1  A: 

Have you tried setting the img tag height/width ?? to bypass IE7 Quirks.

Joe Garrett
Actually, If I remove the link from the `href` portion of the link, it will not trigger. May be somewhere inside the script, Pikachoose is using click method to go to next slide in case of IE, and I even tried to find it out, but no luck so far.
Starx
A: 

Try adding/removing/changing the DOCTYPE for the html document as I have seen IE cause issues due to doctype settings.

Also, try removing the closing slash from the img tag ()

if either of the above works, then compare the working demo and your document type so see if you missed out the proper doctype tag ...

Samnan
+1  A: 

Which actual IE (there's 3 that are stil in use)? Depending on the version, you could make it scream ar user to let it switch to "compatibility mode". Also if you can make sure that you have strict XHTML format (title and alt don't have double-quotes in your snippet), including DOCTYPE that might help. Try using empty a tag for the first image (just a without content, you can give it a blank/transpatent pic in href if you want)

ZXX
yes i have tried with doctype and the error is in pretty much every version
Starx