hi i m using an image slider but i want that the width of the slider should be that of the body i used jquery function to get width but unable to call it from widget kindly help if any one have idea… here is my view code
<script>
function main()
{
return ($(window).width());
}
$(main);
</script>
<div id="imageslider">
<?php
$this->widget('ext.slider.slider', array(
'container'=>'slideshow',
'width'=>'$(main())', // here i want to call the jquery function but it is unable to call it
'height'=>240,
'timeout'=>6000,
'infos'=>true,
'constrainImage'=>true,
'images'=>array('01.jpg','02.jpg','03.jpg','04.jpg'),
'alts'=>array('First description','Second description','Third description','Four description'),
'defaultUrl'=>Yii::app()->request->hostInfo
)
);
?>
</div>