Width By Percentage

  • Aitkulov
    Inactive member
  • Topic Author
  • New Member
  • New Member
More
12 years 2 months ago #22644 by Aitkulov
Width By Percentage was created by Aitkulov
Hi!

Can you help me? I want Carousel to be 100% in width of the page. How can i do it? I can only adjust it by pixels.

Please Log in to join the conversation.

More
12 years 2 months ago #22650 by ivan.milic
Replied by ivan.milic on topic Width By Percentage
You can change options from javascript using:

jQuery('#container').holest_carousel('option','<option_name>',value);

effect of each change are live. See "All options" on this page:

www.holest.com/example.html


You probably want to change radius on window re-size, so script would be:
<script type="text/javascript">

jQuery(document).ready(function(){

jQuery(window).resize(function(){
var new_radius = parseInt((jQuery(window).width() / 2) * 0.7);
jQuery('#container').holest_carousel('option','radius',new_radius);
});

});

</script>

you can place that in head section of index.php of template.

To make container stretch use:

#container{
width:100%!important;
}

Please Log in to join the conversation.

Time to create page: 0.144 seconds
Powered by Kunena Forum