html - Jquery type error, selectors are not working in firefox but working in chrome -


i creating shortlist functionality. have dummy div cloning div , putting div in shortlisted list. thing working fine few days back, today not working please me. following code:

html:

<div class="shortlised-prod1">     <div class="vis">         <div class="prod-thumb">             <img class="short-thumb" src="">         </div>         <div class="title-price-wrap">             <p class="cross"> x</p>             <a href="#"></a>         </div>     </div> </div> 

jquery:

$('.shortlised-prod1')     .clone(true)     .find('img')     .attr("src", a)     .end()     .find('.title-price-wrap a')     .text(b)     .attr("id", id)     .end()     .addclass('shortlised-prod')     .removeclass('shortlised-prod1')     .insertbefore($('.wrap1')); 

on load using code. when load page, shows type error @ console. showing:

typeerror: $(...).clone(...).find(...).attr(...).end not function 


Comments