Salve ho acquistato un plugin jquery (Smooth Zoom Pan - jQuery Image Viewer), ho dei problemi nell’installazione:
uso i seguenti modi per caricare lo script: $cs=Yii::app()->clientScript; $cs->registerScriptFile('script, CClientScript::POS_HEAD);
il plugin viene accompagnato da jquery alla versione 1.9.1, più questo script jquery che è da inserire nella view
<script>
jQuery(function($){
$('#yourImageID').smoothZoom({
width: 512,
height: 384,
zoom_BUTTONS_SHOW : 'NO',
pan_BUTTONS_SHOW : 'NO',
pan_LIMIT_BOUNDARY : 'NO'
});
});
function writeObject(){
var zoomDataObject = $('#yourImageID').smoothZoom('getZoomData');
$('#code').html(
"Normal X: <span style='color:#000000'>"+parseInt(zoomDataObject.normX) +"</span>"
+"<br />Normal Y: <span style='color:#000000'>"+parseInt(zoomDataObject.normY) +"</span>"
+"<br />Normal Width: <span style='color:#000000'>"+parseInt(zoomDataObject.normWidth) +"</span>"
+"<br />Normal Height: <span style='color:#000000'>"+parseInt(zoomDataObject.normHeight) +"</span>"
+"<br /><br />Scaled X: <span style='color:#000000'>"+parseInt(zoomDataObject.scaledX) +"</span>"
+"<br />Scaled Y: <span style='color:#000000'>"+parseInt(zoomDataObject.scaledY) +"</span>"
+"<br />Scaled Width: <span style='color:#000000'>"+parseInt(zoomDataObject.scaledWidth) +"</span>"
+"<br />Scaled Height: <span style='color:#000000'>"+parseInt(zoomDataObject.scaledHeight) +"</span>"
+"<br /><br />Center X: <span style='color:#000000'>"+parseInt(zoomDataObject.centerX) +"</span>"
+"<br />Center Y: <span style='color:#000000'>"+parseInt(zoomDataObject.centerY) +"</span>"
+"<br /><br />Scale Ratio:<br /> <span style='color:#000000'>"+zoomDataObject.ratio +"</span>"
);
}
</script>
ma ottengo questo errore:Uncaught TypeError: Object [object Object] has no method: penso che vada in conflitto con qualcosa…,vi è mai capitato?