that's not going to save you from any troubles.
did you read the jquery docs about on() ?
especially
*Event handlers are bound only to the currently selected elements; they
must exist on the page at the time your code makes the call to .on().* To
ensure the elements are present and can be selected, perform event binding
inside a document ready handler for elements that are in the HTML markup on
the page. If new HTML is being injected into the page, select the elements
and attach event handlers *after* the new HTML is placed into the page. Or,
use delegated events to attach an event handler, as described next.
and what it follows ?
esp. the difference from
$( "#dataTable tbody tr" ).on( "click", function() {
alert( $( this ).text() );
});
and
$( "#dataTable tbody" ).on( "click", "tr", function() {
alert( $( this ).text() );
});
On Monday, September 15, 2014 1:44:49 PM UTC+2, Michel Krav wrote:
>
>
> Thanks Niphlod using the on() function:
> <script>
> jQuery(document).ready(function()
> {
> jQuery('tr.w2p_even.even.with_id,tr.w2p_odd.odd.with_id ').on(
> "dblclick",function() {
>
> var sid = jQuery(this).prop('id');
>
> ajax( "{{=URL('default', 'on_card_selected.html' ) }}",[],
> 'target');
>
> }
>
> );
> }
> );
> </script>
>
> solve my first pb.
>
> For the other point, I still get None to my ajax call in this script,
> maybe ajax is not the solution to reload my first component, any way to
> follow ?
>
>
--
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.