ItSolutionStuff.com

IOS 7 Style Switches for Checkboxes using Switchery JS

By Hardik Savani • June 21, 2023
jQuery

Switchery is a simple component that help us to make beautiful iOS 7 style switches for our checkbox. In this post we will see how to make ios 7 style switches animation using js plugin. If we make using our custom css then it take long time to integrate.

For this example i use CDN of Switchery Plugin so we can simply use CDN without download on local, so we can use bellow path of CDN:


CDN:

https://cdnjs.cloudflare.com/ajax/libs/switchery/0.8.2/switchery.min.css

https://cdnjs.cloudflare.com/ajax/libs/switchery/0.8.2/switchery.min.js

Now we will see full example of Switchery JS Plugin for ios 7 type animation checkboxe, you can also check demo for your testing. So let's follow bellow example:

Example:

<!DOCTYPE html>

<html>

<head>

<title>ISOtype switching animation example using switchery JS</title>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js" type="text/javascript"></script>

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/switchery/0.8.2/switchery.min.css">

<script src="https://cdnjs.cloudflare.com/ajax/libs/switchery/0.8.2/switchery.min.js

" type="text/javascript"></script>

</head>

<body>


<input type="checkbox" class="js-switch" checked />


<script type="text/javascript">

var elem = document.querySelector('.js-switch');

var init = new Switchery(elem);

</script>


</body>

</html>

I hope it can help you...

Hardik Savani

Hardik Savani

I'm a full-stack developer, entrepreneur, and founder of ItSolutionStuff.com. Passionate about PHP, Laravel, JavaScript, and helping developers grow.

📺 Subscribe on YouTube

We Are Recommending You

How to Remove Key Value from Array using JQuery?

Read Now →

How to Get Selected Radio Button Value in JQuery?

Read Now →

How to Only Allow Numbers in a Text Box using jQuery?

Read Now →

JQuery Rotate Image Animation Example Code

Read Now →

How to Remove Empty or Null Values from Array in JQuery?

Read Now →

How to Remove Duplicate Value from Array in JQuery?

Read Now →

PHP Ajax Drag and Drop Sorting Table Rows Example

Read Now →

PHP MySQL Confirmation Before Delete Record using Ajax Example

Read Now →

Bootstrap Lightbox Plugin Example Code

Read Now →

Bootstrap - Input multiple tags example using Tag Manager Jquery Plugin

Read Now →

JQuery Notification Popup Box using Toastr JS Example

Read Now →

JQuery Tag Input Plugin Example Code

Read Now →

JQuery Select Box with Search Option using Chosen Plugin

Read Now →