twitter bootstrap - jQuery: Dynamically Adding Glyphicon -
i having slight functioning issue in firefox w/ jquery glyphicon. used bootstrap build portfolio , used jquery .load
function load portfolio pages dynamically when click on them.
i added jquery .append
function append glyphicon close icon on each opened page, when open , close them on page in portfolio section keeps adding multiple glyphicons. adds more , more open , close.
what happening here? can help?
my code:
$(".close").append('<span class="glyphicon glyphicon-remove-circle"></span>'); $(".glyphicon-remove-circle").click(function(e) { $(".portfoliocontent").fadeout(); });
you can try this:
$(document).on('click','.glyphicon-remove-circle',function(){ $(".portfoliocontent").fadeout(); });
or way too:
$('.close').on('click','.glyphicon-remove-circle',function(){ $(".portfoliocontent").fadeout(); });
Comments
Post a Comment