Right, my mistake. Only in the onclick handler 'this' refers to
window. It's been such a long time since I last used inline handlers
that I'd forgotten :)
On Jan 24, 9:55 pm, candlerb wrote:
> I found the solution. Whilst jRails uses jquery-ui-1.5, it is still
> using jquery-1.2.6, and "closest
I found the solution. Whilst jRails uses jquery-ui-1.5, it is still
using jquery-1.2.6, and "closest" is a 1.3 feature.
The following works just fine:
remove
Ricardo Tomasi wrote:
> 'this' in an attribute event handler refers to 'window', not the
> element itself.
In my copy of JavaScript,
'this' in an attribute event handler refers to 'window', not the
element itself. You're better of using proper event listeners:
$('.thing a').click(function(){
$(this).parents('.setting').remove();
});
or a function to which the event will be passed by default:
function removeSetting(event){
jQuery shouldn't clash with any other library if you are doing it
correctly:
http://docs.jquery.com/Using_jQuery_with_Other_Libraries
basically, call jQuery.noConflict();
then wrap all your jQuery code inside:
jQuery(function($){
//code
});
- ricardo
On Oct 17, 6:23 pm, simpme <[EMAIL PRO
4 matches
Mail list logo