javascript - Links not working on Chrome & IE -


i have used jquery bind menu on website , that's working in firefox not on chrome & ie. issue : when click on link anchor text in chrome, no redirect or navigation.

check on website : http://www.pricingindia.in

function show_n(e) {         (var t = 1; t < 9; t++) {             if (e == t) {                 $("#snav" + t).css("display", "block");                 $("#stab" + t).addclass("act")             } else {                 $("#snav" + t).css("display", "none");                 $("#stab" + t).removeclass("act")             }         }         if (e == 1) { $("#snav" + e).html('<ul class=\"snav\"><li><a href=\"http:\/\/www.pricingindia.in\/mobile\/87\" title=\"mobile phones\">mobile phones <span>(15707)<\/span><\/a><\/li><li><a href=\"http:\/\/www.pricingindia.in\/tablet\/24\" title=\"tablets\">tablets <span>(1394)<\/span><\/a><\/li><\/ul>');} 

enter image description here

use append function

try this

if (e == 1) {     $('#snav' + e).append('<ul class="snav"><li><a href="http://www.pricingindia.in/mobile/87" title="mobile phones">mobile phones <span>(15707)</span></a></li><li><a href="http://www.pricingindia.in/tablet/24" title="tablets">tablets <span>(1394)</span></a></li></ul>');} 

try way

document.getelementbyid('#snav' + e).innerhtml = "<ul class="snav"><li><a href="http://www.pricingindia.in/mobile/87" title="mobile phones">mobile phones <span>(15707)</span></a></li><li><a href="http://www.pricingindia.in/tablet/24" title="tablets">tablets <span>(1394)</span></a></li></ul>"; 

Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -