Showing posts with label Jquery. Show all posts
Showing posts with label Jquery. Show all posts

how to increase and decrease font size dynamically in jquery

Description:
Here i will explain how to increase or decrease font size using jquery. It is easy and simple way to do this use below function:


<script type="text/javascript">
        $(document).ready(function () {
            var divtxt = $('#fontdiv');
            // Increase Font Size
            $('#btnincfont').click(function () {
                var curSize = divtxt.css('fontSize');
                var newSize = parseInt(curSize.replace("px", "")) + 1;
                $(divtxt).css("fontSize", newSize + "px");
            });
            // Decrease Font Size
            $('#btndecfont').click(function () {
                var curSize = divtxt.css('fontSize');
                var newSize = parseInt(curSize.replace("px", "")) - 1;
                $(divtxt).css("fontSize", newSize + "px");
            })
        });
    </script>

<input type="button" id="btnincfont" value=" + " />
<input type="button" id="btndecfont" value=" - " />

how to use zoom lens in jquery

Description:
in this example we explain that how to create a lense zoom effect(mirror effect) of the image using jqury.


Look at the above Image we move the mouse on the wheel of the car then this part will be displayed in lenszoom effect.

First of all add jquery.elevateZoom-2.5.5.min.js and jquery-1.8.3.min.js