connectseekers.com

Friday, 12 February 2016

jQuery Animated Resizable Panel OR Div Control On Mouse Click In Asp.Net

2/12/2016 - By Pranav Singh 0

This article will show you how you can create an animated resizable message board using jQuery in asp.net. In this we will learn how to create jQuery animated resizable panel or div control on mouse click in asp.net.

 
 <link rel="stylesheet" href="http://code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
    <script src="http://code.jquery.com/jquery-1.10.2.js"></script>
    <script src="http://code.jquery.com/ui/1.11.4/jquery-ui.js"></script>


In above I have added the jQuery library reference and jQuery ui css reference. Now add the below jQuery code in header of the page.


<script>
        $(function () {
            $("#resizable-div").resizable({
                animate: true
            });
        });
    </script>


In above code I have used jQuery resizable function and set the animation property true so that whenever user resize the panel it get resized with some animation effect. Here is the compete code.


<!doctype html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>jQuery Animated Resizable Panel OR Div Control On Mouse Click In Asp.Net</title>
    <link rel="stylesheet" href="http://code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
    <script src="http://code.jquery.com/jquery-1.10.2.js"></script>
    <script src="http://code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
    <style>
        .fontsize {
            font-size: 11px;
        }

        #resizable-div {
            width: 130px;
            height: 130px;
            padding: 0.5em;
        }

            #resizable-div h3 {
                text-align: center;
                margin: 0;
            }

        .ui-resizable-helper {
            border: 1px dotted gray;
        }
    </style>
    <script>
        $(function () {
            $("#resizable-div").resizable({
                animate: true
            });
        });
    </script>
</head>
<body>
    <div id="resizable-div" class="ui-widget-content">
        <h3 class="ui-widget-header">Message Board</h3>
        <br />
        <div>This is a message board.</div>
    </div>
</body>
</html>


Now we have done run the application to check the output.


About the Author

We are the group of people who are expertise in different Microsoft technology like Asp.Net,MVC,C#.Net,VB.Net,Windows Application,WPF,jQuery,Javascript,HTML. This blog is designed to share the knowledge.

Get Updates

Subscribe to our e-mail newsletter to receive updates.

Share This Post

0 comments:

Please let me know your view

Free Ebooks


About Us

We are the group of people who are expertise in different Microsoft technology like Asp.Net,MVC,C#.Net,VB.Net,Windows Application,WPF,jQuery,Javascript,HTML. This blog is designed to share the knowledge.

Contact Us

For writing article in this website please send request by your

GMAIL ID: dotnetpools@gmail.com
Email Id : contact@aspdotnet-pools.com

Bugs and Suggestions

As we all know that this website is for sharing knowledge and providing proper solution. So while reading the article is you find any bug or if you have any suggestion please mail us at contact@aspdotnet-pools.com.

Partners


Top jQuery Plugins

Global Classified : Connectseekers.com
© 2014
back to top