Im pretty sure my syntax this wrong because the script only works if the string matches Video, if the string has the word Audio it is ignored. Also since the href tags have a value of # the redirect for ../../../index.html doesnt work.
js
var ua = navigator.userAgent.toLowerCase();
var isIE8 = /MSIE 8.0/i.test(ua);
if (isIE8) {
$('a').click(function () {
var srcTag = $(this).find('img').attr('src');
if (srcTag.indexOf('Video' || 'Audio') > -1) {
if (confirm('Download Safari? nn http://apple.com/safari/download/')) {
window.location = 'http://apple.com/safari/download/';
} else { window.location = '../../../index.html';}
} else {
alert('no match');
}
});
}
html
<a href=#><img src=Video/000_Movies/assets/005_CCC_Jesus_Story_80x60.jpg />test1</a>
<a href=#><img src=Audio/000_Movies/assets/006_GSP_Gods_Story_80x60.jpg />test2</a>
<a href=#><img src=Media/000_Movies/assets/002_God_Man_80x60.jpg />test3</a>