Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jquery Pikachoose plugin giving unusual results in IE

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
like image 223
Starx Avatar asked Jun 10 '10 11:06

Starx


1 Answers

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 ...

like image 165
Samnan Avatar answered Nov 16 '22 02:11

Samnan