Get height/width numbers & console logs not showing
Can't figure out what to do - with jquery1.8 a few things are now broken:
- $(function() {
- if ("Yes" == "Yes") {
- $('.contentbutton_searcher_stack-its_showbutton').css({"display": "block"});
- var butht = parseFloat($('div.butwrap_searcher_stack-its_showbutton').css('height'));
- console.log('Button Ht: ' + butht);
- if ("center" == "center") {
- $('.butwrap_searcher_stack-its_showbutton').each(function() {
- var fullinitwd = $(this).closest('div[class^="searchercustomcontent"]').width();
- var fullwd = parseFloat(fullinitwd);
- console.log('Full Width: ' + fullwd);
- var butinitwd = parseFloat($('div.butwrap_searcher_stack-its_showbutton').css('width')); /* in percentage */
- var butpxwd = (butinitwd/100) * fullwd; /* converted to pixels */
- var butwd = Math.round(butpxwd);
- console.log('Button Width: ' + butwd);
- var butmarinitlt = (fullwd - butwd)/2;
- var butmarlt = Math.round(butmarinitlt);
- console.log('Button Center Offset: ' + butmarlt);
- $(this).css({'left': + butmarlt + 'px'});
- });
- }
- }
- });
- On line #6, button height keeps coming out as NaN, but I parsefloated it which worked in the past.
- I'm not seeing any of the console logs after line #7, not sure why.
Thanks, Bill