javascript - Jquery - Calling 3rd tag -
i need activate third party tag on website when webpage show message "choisissez la finition"
the div show message
<div id="vw_dbs_ihdcc_trimselector" class="container containercolquarter"><h2>choisissez la finition</h2>
i've tried
function (session, cb){window.addeventlistener("hashchange", function() { if(document.location.hash.indexof("carimage") > -1) { var len2 = jquery("h2:contains('choisissez la finition')").length; if (len2 > 0) { cb(); } } }); }
any advice, ?
many thanks,
what need following.
function dosomething(session, cb){ if(location.hash.indexof("carimage") > -1) { var len = $("h2:contains('choisissez la finition')").length; if (len) { cb(); } } }); //define callback function function mycb() { alert ("i callback function"); } //bing event on hashchange using jquery anyway have it. $(window).on("hashchange", function() { //call function params dosomething("yoursession", mycb); });
Comments
Post a Comment