Comments (3)
Hi, thanks for the suggestion, but I'd like to understand better pro sides of this.
Since field status changes are reflected in real time and original checkbox is always kept (but hidden), don't see any advantage of copying (then doubling) classes also on switch.
from lc-switch.
I have many options and for each option, there are 2 categories. So, I decide to do UX like this.
Notification1 Notification2
Option 1 On/Off On/Off
Option 2 On/Off On/Off
etc..
So, i need to give style to each elements. I tried by putting the style on input element assuming the common behaviors of widgets. Obviously, it didn't work out. I had to select the element in css like this
div.lcs_wrap:nth-child(1){
float: left;
width: 200px;
}
div.lcs_wrap:last-child(2){
float: left;
}
I hope you got me.
from lc-switch.
Being a styling matter: wouldn't be cleaner to wrap those fields with differengt elements?
<div class="row1"><input type="checkbox" /></div>
<div class="row1"><input type="checkbox" /></div>
<div class="row2"><input type="checkbox" /></div>
<div class="row2"><input type="checkbox" /></div>
I use prefer to not add custom CSS to switches and use a similar solution in my WP plugins.
Doubling classes is never a good idea in my opinion. Maybe a custom attribute to set custom classes to switch wrapper would be better, what do you think?
from lc-switch.
Related Issues (15)
- onclick event HOT 1
- jQuery Ui HOT 4
- Method to enable or disable switch HOT 1
- function lcs_toggle() doesn't exist HOT 1
- label with "for" attribute toggles the radio / checkbox but the switches do not change HOT 1
- Feature Request: make events bubbling or dispatch a bubbling change event on toggle HOT 4
- Public Event Listener for input type checkbox that is unchecked
- Unsafe assignment to innerHTML HOT 3
- Is it possible to theme only one checkbox on a page ? HOT 1
- Typo on the homepage HOT 1
- Resizing the switch HOT 2
- jQuery's delegated becomes deprecated... HOT 3
- Method to toggle state HOT 1
- Addon-reviewers security risk HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lc-switch.