Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JCrop, how to clear all the div width/height markup?

I have a profile picture system which allows image cropping using jCrop. I've noticed if the user goes through the process a few times, the crop dimensions are not calculated properly simply because the previous image is still there. I've tried the destroy() method from the API , but that doesn't clear the image source from the .jcrop-holder div and its child image element.

How can I get rid of this easily? Thanks.

like image 647
williamsandonz Avatar asked Sep 04 '12 05:09

williamsandonz


1 Answers

Making some huge assumptions about your situation, I've decided that you might try something like this: ​$(function(){$(​'.jcrop-holder').removeAttr("style");​​​​​​​​​});​​​​​

If that's not what you need, you oughtta give us some more info!

like image 91
crowjonah Avatar answered Oct 29 '22 18:10

crowjonah