Difference between revisions of "Team:SVCE Chennai/Practices"

Line 289: Line 289:
 
<script src="https://cdnjs.cloudflare.com/ajax/libs/annyang/2.0.0/annyang.min.js"></script>
 
<script src="https://cdnjs.cloudflare.com/ajax/libs/annyang/2.0.0/annyang.min.js"></script>
 
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js"></script>
 
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js"></script>
 +
<style>
 +
    .hide-bullets {
 +
    list-style:none;
 +
    margin-left: -40px;
 +
    margin-top:20px;
 +
}
  
 +
.thumbnail {
 +
    padding: 0;
 +
}
 +
 +
.carousel-inner>.item>img, .carousel-inner>.item>a>img {
 +
    width: 100%;
 +
    }</style>
 +
    <script>
 +
        jQuery(document).ready(function($) {
 +
 +
        $('#myCarousel').carousel({
 +
                interval: 5000
 +
        });
 +
 +
        //Handles the carousel thumbnails
 +
        $('[id^=carousel-selector-]').click(function () {
 +
        var id_selector = $(this).attr("id");
 +
        try {
 +
            var id = /-(\d+)$/.exec(id_selector)[1];
 +
            console.log(id_selector, id);
 +
            jQuery('#myCarousel').carousel(parseInt(id));
 +
        } catch (e) {
 +
            console.log('Regex failed!', e);
 +
        }
 +
    });
 +
        // When the carousel slides, auto update the text
 +
        $('#myCarousel').on('slid.bs.carousel', function (e) {
 +
                var id = $('.item.active').data('slide-number');
 +
                $('#carousel-text').html($('#slide-content-'+id).html());
 +
        });
 +
        });</script>
 
</html>
 
</html>

Revision as of 00:21, 19 September 2015

Human Practices

Lets talk!

Sri Venkateswara College of Engineering, Chennai