- Posts: 3
- Thank you received: 0
Width By Percentage
13 years 1 month 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.
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.
-
ivan.milic
Support Staff -
- Offline
- Moderator
-
Less
More
- Posts: 14116
- Thank you received: 1639
13 years 1 month 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;
}
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.288 seconds