jquery shake effect and margin-auto -
having spot of bother this... shake effect example
in firefox if omit line
$this.css({'margin-left':$this.position().left});
then box animated on left instead of in centre. if keep line of code fix firefox chrome has same problem.
any tips on getting round grand.
thanks in advance
the solution (not happy 1 'works' cross browser - cross browser, got ie9 , work machine can't run virtual pc!!!!);
var options = { direction: 'left', distance: 10, times: 2 }; var left = $this.position().left > parseint($this.css('margin-left')) ? $this.position().left : $this.css('margin-left'); $this .css({'margin-left': left}) .effect('shake' , options , 75 , function(){ $this.removeattr('style'); });
Comments
Post a Comment