JCrop - update preview onload?

I tried to set the default value and the default value is getting previewed in the preview box jQuery(window). Load(function(){ jQuery('#cropbox'). Jcrop({ onChange: showPreview, onSelect: showPreview, setSelect: 100, 0, 100, 100 , aspectRatio: 1 }); }) This just worked the way I wanted.

You might have some other error on your script. But you don't have to invoke anything special to have to show the preview. If you are not doing this onload then try doing it onload.

I tried to set the default value and the default value is getting previewed in the preview box. JQuery(window). Load(function(){ jQuery('#cropbox').

Jcrop({ onChange: showPreview, onSelect: showPreview, setSelect: 100, 0, 100, 100 , aspectRatio: 1 }); }); This just worked the way I wanted. You might have some other error on your script. But you don't have to invoke anything special to have to show the preview.

If you are not doing this onload then try doing it onload.

Well shiver me timbers. Thats annoying. Thanks for pointing me in the right direction – JasonS Aug 31 at 12:27.

I couldn't get this to work either and found your question searching for a solution myself. I'm using the preview demo (tutorial3) in Jcrop v0. 9.9. Changed jQuery(function($){ to jQuery(window).

Load(function(){ And added the option setSelect: 0, 40, 312, 244 And, it doesn't update the preview on load.. The workaround I've found is to use the api animateTo as well as setSelect (or on it's own if you like the animation, the speed of which you can change with the option swingSpeed) I've made the change in your code jQuery(function($){ // Create variables (in this scope) to hold the API and image size var jcrop_api, boundx, boundy; $('#target'). Jcrop({ onChange: updatePreview, onSelect: updatePreview, setSelect: 0, 0, selectWidth, selectHeight , aspectRatio: 1 },function(){ // Use the API to get the real image size var bounds = this.getBounds(); boundx = bounds0; boundy = bounds1; // Store the API in the jcrop_api variable jcrop_api = this; jcrop_api. AnimateTo( 0, 0, selectWidth, selectHeight ); }); function updatePreview(c) { if (parseInt(c.

W) > 0) { var rx = 100 / c. W; var ry = 100 / c. H; $('#preview').

Css({ width: Math. Round(rx * boundx) + 'px', height: Math. Round(ry * boundy) + 'px', marginLeft: '-' + Math.

Round(rx * c. X) + 'px', marginTop: '-' + Math. Round(ry * c.

Y) + 'px' }); } }; }).

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions