Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript How-To
| Search | Today's Posts | Mark Forums Read
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old January 13th, 2010, 11:37 AM
Friend of Wrox
Points: 8,019, Level: 38
Points: 8,019, Level: 38 Points: 8,019, Level: 38 Points: 8,019, Level: 38
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2005
Location: Mauchline, East Ayrshire, Scotland
Posts: 1,525
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to crmpicco Send a message via AIM to crmpicco Send a message via MSN to crmpicco Send a message via Yahoo to crmpicco
Default accessing my jQuery NiceForm re-styled checkboxes

I am using the jQuery plugin - Nice Form. http://www.whitespace-creative.com/jquery/jNice/

When Nice Form is used it changes my checkboxes as seen below. So when you are using the browser you actually click the <div> and not the checkbox. Can anyone advise of a way for me to capture, in jQuery, when I am ticking the Email checkbox and when i'm ticking the SMS checkbox?

PHP Code:
<p>
  
I would like to be contacted by
  
<label style="padding-right: 10px;" for="comm_email">Email</label>
  <
div class="NFCheck NFh" style="left: 431px; top: 490px;"></div>
  <
input id="comm_email" class="NFhidden" type="checkbox" name="comm_email"/>
  <
label style="padding-right: 10px;" for="comm_sms">SMS</label>
  <
div class="NFCheck NFh" style="left: 534px; top: 490px;"></div>
  <
input id="comm_sms" class="NFhidden" type="checkbox" name="comm_sms"/>
</
p
Thanks,
Picco
__________________
_______________________
Ayrshire Minis - a Mini E-Community
http://www.ayrshireminis.com
http://www.crmpicco.co.uk
  #2 (permalink)  
Old January 13th, 2010, 12:21 PM
Friend of Wrox
Points: 8,019, Level: 38
Points: 8,019, Level: 38 Points: 8,019, Level: 38 Points: 8,019, Level: 38
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2005
Location: Mauchline, East Ayrshire, Scotland
Posts: 1,525
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to crmpicco Send a message via AIM to crmpicco Send a message via MSN to crmpicco Send a message via Yahoo to crmpicco
Default

I have a solution to this now. The working code:
PHP Code:
var displayFacebox;
        
switch($(
this).next().attr("id")) {
  case 
'comm_email' 
    
displayFacebox false
    break;
  case 
'comm_sms' 
    
displayFacebox true;
    break;

__________________
_______________________
Ayrshire Minis - a Mini E-Community
http://www.ayrshireminis.com
http://www.crmpicco.co.uk
  #3 (permalink)  
Old January 13th, 2010, 12:22 PM
Friend of Wrox
Points: 8,019, Level: 38
Points: 8,019, Level: 38 Points: 8,019, Level: 38 Points: 8,019, Level: 38
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2005
Location: Mauchline, East Ayrshire, Scotland
Posts: 1,525
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to crmpicco Send a message via AIM to crmpicco Send a message via MSN to crmpicco Send a message via Yahoo to crmpicco
Default

Just realised I am now registered 5 years on P2P Wrox. Yay! :-)
__________________
_______________________
Ayrshire Minis - a Mini E-Community
http://www.ayrshireminis.com
http://www.crmpicco.co.uk


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to use LeaveNotice in Jquery FileFound Javascript How-To 0 December 28th, 2009 07:11 AM
Jquery issue FileFound Javascript How-To 0 December 28th, 2009 07:00 AM
JavaScript vs JQuery skijor ASP.NET 3.5 Basics 4 August 7th, 2009 10:21 AM
XML AND JQUERY pallone BOOK: Beginning JavaScript and CSS Development with jQuery 10 July 10th, 2009 10:08 AM
jQuery Related Problems sakshamgautam BOOK: Professional ASP.NET MVC 1.0 ISBN: 978-0-470-38461-9 1 June 13th, 2009 08:20 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.