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){
3 matches
Mail list logo