C3rd
Quirks on jQuery plugin "lc_switch"
Posted: 12 May 2021, 21:57pm - Wednesday
We've been using lc_switch for our new UI revamp and found some quirks. Here they are:
When binding lc_switch
jQuery plugin, do not do these following:
QUIRK 1
WRONG
<label class="ocl-switch-label" for="app_confidential">
<input class="ocl-switch" type="checkbox" id="app_confidential" name="app_confidential" /> Is the project confidential?
</label>
CORRECT
<label class="ocl-switch-label" for="app_confidential">
<input class="ocl-switch" type="checkbox" id="app_confidential_answer" name="app_confidential" /> Is the project confidential?
</label>
EXPLANATION:
You should not name the element
id
andname
the same
QUIRK 2
WRONG
<label class="ocl-switch-label" for="app_confidential_answer">
<input class="ocl-switch" type="checkbox" id="app_confidential_answer" name="app_confidential" /> Is the project confidential?
</label>
CORRECT
<label class="ocl-switch-label" for="app_confidential">
<input class="ocl-switch" type="checkbox" id="app_confidential_answer" name="app_confidential" /> Is the project confidential?
</label>
EXPLANATION:
You should not address
label
tagfor=""
attribute to an element'sid
, instead address to element'sname
Search
Categories
Related Links
- Apache Web Server
- ASP Immigration Services Ltd.
- CentOS Linux
- Color Scheme Picker
- CSS Button Generator
- Deviant Art Account
- Don Tabaniag - GraphiCult
- Jerson Maglasang Weblog
- Joshua Manlunas
- Mark "mungkey" Vicente
- Matt Arnilo Baluyos
- MySQL
- Paul Labis
- PHP
- PrendStar
- Ridvan Baluyos
- Scott Davies
- SEO Fart XML-RPC Ping Tool
- Stripes Generator
- The Hero
- Ubuntu Linux
- Vim Carlo Nabora (DA)
- Wella Maria Hong
- What is my IP?
- Xavier University - Ateneo de Cagayan
- Zabyer Community