Umm, It seems fine, I'll check it later.
Thanks!
On 23 nov, 15:13, Dustan wrote:
> Perhaps something along these lines is what you are looking for?
>
> $(document).click(function(event) {
> if (!$(event.target).hasClass('classname')) {
> // run this code if anywhere in the document e
Perhaps something along these lines is what you are looking for?
$(document).click(function(event) {
if (!$(event.target).hasClass('classname')) {
// run this code if anywhere in the document except the item
is clicked
}
});
On Nov 20, 8:29 am, Keysher wrote:
> Hi!
>
> I am newbi
Works fine!
Thanks!! :o)
On 21 nov, 15:29, mofle wrote:
> Here you go:
>
> $(document).click(function(){
> alert('clicked outside classname');
>
> });
>
> $('.classname').click(function(e){
> e.stopPropagation();
>
> });
>
> First you bind a click event to the document with the a
Here you go:
$(document).click(function(){
alert('clicked outside classname');
});
$('.classname').click(function(e){
e.stopPropagation();
});
First you bind a click event to the document with the action you want.
Then you bind the classname to stop it from propagate up to the
d
4 matches
Mail list logo