dougmacklin
dougmacklin

Reputation: 2610

onClick Not Working In Internet Explorer, Looking for Workaround

I'm working on a video gallery page where there are 6 thumbnails and the user can click on them to play the corresponding video.

Of course, there are more than 6 videos total, so users can navigate through various categories/pages.

Take a look: Video Gallery Rough

Everything is working fine in Chrome and Firefox, but clicking on the thumbnails does not work in Internet Explorer. I've done some research and it seems as though onClick has issues in IE, but none of the solutions I've found have worked.

Basically the video thumbnails are in a table, and each has an onClick event:

<td id='videoBox1td' onClick=''>

When the user loads/switches pages, jQuery() dynamically edits the onClick attribute:

$('#videoBox' + i + 'td').attr({'onClick':'frames[\'videourl\', videoPlaylist);'});

Any ideas? Thanks in advance.

Upvotes: 0

Views: 780

Answers (1)

Bojin Li
Bojin Li

Reputation: 5789

How about this?

    $('#videoBox' + i + 'td').bind("click", function () {
        ... do stuff here...
    }

Upvotes: 1

Related Questions