IOS 7 Switch
How do I make an ios 7 switch?
Example of ChocolateChip-UI switch control. This expects Safari or iOS device running iOS 6 or 7.. What is a ios 7 switch? How do you make a ios 7 switch? This script and codes were developed by Robert Biggs on 24 August 2022, Wednesday.
IOS 7 Switch - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>iOS 7 Switch</title> <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="mobile-web-app-capable" content="yes">
<meta name="msapplication-tap-highlight" content="no"> <link rel='stylesheet prefetch' href='https://s3-us-west-2.amazonaws.com/s.cdpn.io/77047/chui.ios-3.0.4.min.css'>
</head>
<body> <nav class='current'> <h1>iOS 7 Switch</h1>
</nav>
<article id="main" class="current"> <section> <ul class='list'> <li class='comp'> <div> <h3>Sleep</h3> </div> <aside> </aside> </li> </ul> <ul class='list'> <li class='comp'> <div> <h3>Vacation</h3> </div> <aside> </aside> </li> </ul> <ul class='list'> <li class='comp'> <div> <h3>Breakfast</h3> </div> <aside> </aside> </li> </ul> <p><span><strong>Response: </strong></span><span id="response"></span></p> </section>
</article> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script src='https://s3-us-west-2.amazonaws.com/s.cdpn.io/77047/chui-3.0.4.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
IOS 7 Switch - Script Codes JS Codes
$(function() { var sleepSwitch = { id : "sleepSwitch", state : "on", name : "activity.choice", value: "sleep" }; var vacationSwitch = { id : "vacationSwitch", state : "off", name : "activity.choice", value : "vacation" }; var breakfastSwitch = { id : "breakfastSwitch", state : "off", name : "activity.choice", value : "breakfast" }; $('aside').each(function(ctx, idx) { if (window && window.jQuery) { temp = ctx; ctx = idx; idx = temp; } switch (idx){ case 0: $(ctx).prepend($.UICreateSwitch(sleepSwitch)); break; case 1: $(ctx).prepend($.UICreateSwitch(vacationSwitch)); break; case 2: $(ctx).prepend($.UICreateSwitch(breakfastSwitch)); break; } }) $('.switch').UISwitch(); // Set response to last checked switch: $('.switch').each(function(ctx, idx) { var temp; if (window && window.jQuery) { temp = ctx; ctx = idx; idx = temp; } if (ctx.classList.contains('on')) { $('#response').html($(ctx).find('input').val()); } }); var handleSwitch = function(_switch) { var value = ''; if (_switch.classList.contains('on')) { value = $(_switch).find('input').val(); $('#response').html(value); } else { $('#response').empty(); } }; $.body.on('singletap', '.switch', function() { handleSwitch(this); });
});
Developer | Robert Biggs |
Username | rbiggs |
Uploaded | August 24, 2022 |
Rating | 3 |
Size | 2,235 Kb |
Views | 26,312 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Busy Indicator V5 | 2,055 Kb |
Simple List | 1,736 Kb |
Simple Navigation List | 2,261 Kb |
Slide out Menu | 4,936 Kb |
IOS 7 Selection List | 1,962 Kb |
Simple List | 1,674 Kb |
Navigation List | 1,903 Kb |
IOS 7 Segmented Control | 2,577 Kb |
Dynamic List | 2,257 Kb |
IOS 7 Deletable List | 2,180 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Fluid Responsive Typography | Jonmilner | 4,205 Kb |
Mega Menu by Joni | Asakasinsky | 3,171 Kb |
Cool Page Split Effect | Anthonyadamski | 6,128 Kb |
Mosaic transition effect between two photos using jQuery | Stathisg | 2,518 Kb |
Classy Blockquote Styling | Andrewwright | 3,212 Kb |
Super Discount | Orrinward | 3,225 Kb |
Expandable Left Side Bar with jQuery animate | Retrofuturistic | 2,483 Kb |
The Monty Hall Problem | Melatonind | 4,360 Kb |
A Pen by Miro Olma | Programiro | 2,342 Kb |
Ball bouncing loading animation | Adam2326 | 3,144 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!