In this article, we will learn jQueryUI. This is the third part of this article series of jQueryUI. In this part, we will learn about jQuery UI Effects. UI stands for User interface and it's used for creating user-interactive applications using jQuery and HTML.
Basic Knowledge of,
- HTML
- JavaScript
- Css
In this part, we are going to learn about jQuery Effects
- Hide()
- Show()
- Add class
- Remove class
Hide/show
Open Visual Studio and create a new project -- rename it as jQuery and download the required jQuery reference file from the jQuery Website or NuGet package manager and add the reference of the jQuery file into the page's head section,
- <script src="Scripts/jquery-1.10.2.js"></script>
- <script src="Scripts/jquery-ui.js"></script>
- <link href="Scripts/jquery-ui.css" rel="stylesheet" />
- <div id="Mdiv" style="height:110px;width:190px;border:2px solid red">jQuery Hide and Show Effect</div>
- <button id="btnhide">Hide</button>
- <button id="btnshow">Show</button>
- <script>
- $(document).ready(function() {
- $("#btnhide").click(function() {
- $("#Mdiv").hide();
- });
- $("#btnshow").click(function() {
- $("#Mdiv").show();
- });
- });
- </script>
- <!DOCTYPE html>
- <html>
- <head>
- <title></title>
- <script src="Scripts/jquery-1.10.2.js"></script>
- <script src="Scripts/jquery-ui.js"></script>
- <link href="Scripts/jquery-ui.css" rel="stylesheet" />
- <meta charset="utf-8" />
- <script>
- $(document).ready(function() {
- $("#btnhide").click(function() {
- $("#Mdiv").hide();
- });
- $("#btnshow").click(function() {
- $("#Mdiv").show();
- });
- });
- </script>
- </head>
- <body>
- <div id="Mdiv" style="height:110px;width:190px;border:2px solid red">jQuery Hide and Show Effect</div>
- <button id="btnhide">Hide</button>
- <button id="btnshow">Show</button>
- </body>
- </html>
Addclass/Removeclass
- <div id="Mdiv">jQuery Hide and Show Effect</div>
- <button id="btnadd">Add Css</button>
- <button id="btnremove">Remove Css </button>
- <style>
- .maincss {
- color: red;
- background-color: yellow;
- font-size: 24px;
- }
- </style>
- <script>
- $(document).ready(function() {
- $("#btnadd").click(function() {
- $("#Mdiv").addClass("maincss");
- });
- $("#btnremove").click(function() {
- $("#Mdiv").removeClass("maincss")
- });
- });
- </script>
- <!DOCTYPE html>
- <html>
- <head>
- <title></title>
- <script src="Scripts/jquery-1.10.2.js"></script>
- <script src="Scripts/jquery-ui.js"></script>
- <link href="Scripts/jquery-ui.css" rel="stylesheet" />
- <meta charset="utf-8" />
- <style>
- .maincss {
- color: red;
- background-color: yellow;
- font-size: 24px;
- }
- </style>
- <script>
- $(document).ready(function() {
- $("#btnadd").click(function() {
- $("#Mdiv").addClass("maincss");
- });
- $("#btnremove").click(function() {
- $("#Mdiv").removeClass("maincss")
- });
- });
- </script>
- </head>
- <body>
- <div id="Mdiv">jQuery Hide and Show Effect</div>
- <button id="btnadd">Add Css</button>
- <button id="btnremove">Remove Css </button>
- </body>
- </html>
Summary

Alice NguyenPosted Nov 28, 2018, 10:05 PM
Thank for sharing, very nice article
Bala SPosted Nov 28, 2018, 12:21 PM
Good to know , thanks for sharing.
Manoj KumarPosted Nov 26, 2018, 12:08 PM
Vry nyc...................................