I was trying to implement the jquery code example to conditionally show or 
hide part of the page (see page 505 in 
https://dl.dropboxusercontent.com/u/18065445/web2py/web2py_manual_5th.pdf).

It didn't work because it was using the attr function as: 
     if(jQuery('#taxpayer_married').attr('checked'))

Looking at the functions of jQuery, I realized that I should use .prop() 
function instead of .attr().

Later, I discovered that the online version of the book 
(http://www.web2py.com/books/default/chapter/29/11/jquery-and-ajax) used 
the right function:

if(jQuery('#taxpayer_married').prop('checked'))

I suppose  it will get corrected in the next version of the pdf.

Best regards.

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to