javascript - Unable to get property 'hide' jquery -


why have error internet explorer code, other browser working fine, ie problem

unable property 'hide' of undefined or null reference unable property 'show' of undefined or null reference 

code

if(data.button) {     this.mouseenter(function()     {         $button.hide();     });      this.mouseleave(function()     {         $button.show();     }); } 

rest of code

var onload = function()     {         $this.unbind('load', onload);          $wrap = $('<div id="profile_changer_wrap"/>');      $this.wrap($wrap);         if(data.data['type'] == 'avatar'){             var lngedit = 'edit profile image';             var class_c = 'profile_img';         }else if(data.data['type'] == 'banner'){             var lngedit = 'edit cover image'             var class_c = 'cover_img';         };           $button = $('<div id="profile_changer_button" class="'+class_c+'">'+lngedit+'</div>').insertafter($this);      $button.css(     {         'top': ($this.outerheight(true) - $button.height())/2 - 5,         'left': ($this.outerwidth(true) - $button.width())/2 - 10     }); }; 


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -