Wednesday 15 July 2015

Jquery html: issue with width of a container -



Jquery html: issue with width of a container -

in website i'm using fonts typekit.

only in safari (mac , windows) have issue when page loaded:

you can note h3#superfood-ingredient has width of 3px . after refresh, h3#superfood-ingredient has right width.

font taken typekit, , code of jquery following:

var url = site+'/feeds/superfood?id='+id; $.ajax({ method: 'get', url: url, datatype: 'json', success : function(response) { $(jquery.parsejson(json.stringify(response))).each(function() { var ingredient = this.ingredient; var description = this.description; var find_it = this.find_it; $('#superfood-ingredient').html(ingredient); $('#superfood-description').html(description); $('p#superfood-find-it>span').html(find_it); }); } });

you can forcefulness it's width css. know it's bad internationalization works:

h3#superfood-ingredient { display:inline-block; width:179px; }

jquery

No comments:

Post a Comment