On every click event, on the page, but except on specific element,
with id="elem_id" to do something. The element with id="elem_id" need
to update a table. And when I click on something else, that is not the
element with id="elem_id" I want that table to come back on the
original form. I'm intresting only in the jquery syntax, how can I
select all page, without a specific element, on click event.
});
On Fri, Nov 6, 2009 at 14:13, NMarcu <marcu.nico...@gmail.com> wrote:
> Hello all,
> I want to do something like this:
> On every click event, on the page, but except on specific element,
> with id="elem_id" to do something. The element with id="elem_id" need
> to update a table. And when I click on something else, that is not the
> element with id="elem_id" I want that table to come back on the
> original form. I'm intresting only in the jquery syntax, how can I
> select all page, without a specific element, on click event.
On Fri, Nov 6, 2009 at 14:22, Leonardo K <leo...@gmail.com> wrote:
> $(document).ready(function(){
> $('body').click(function(e){
> var elem = e.target;
> if ( $(elem).attr('id') != "elem_id" ){
> //do something
> }else{
> //do something
> }
> });
> });
> On Fri, Nov 6, 2009 at 14:13, NMarcu <marcu.nico...@gmail.com> wrote:
>> Hello all,
>> I want to do something like this:
>> On every click event, on the page, but except on specific element,
>> with id="elem_id" to do something. The element with id="elem_id" need
>> to update a table. And when I click on something else, that is not the
>> element with id="elem_id" I want that table to come back on the
>> original form. I'm intresting only in the jquery syntax, how can I
>> select all page, without a specific element, on click event.
Can I do something like this:
$(document).ready(function(){
$('body').click(function(e){
var elem = e.target;
if ( $(elem).attr('class') != "elem_class" ){
//do something
}else{
//do something
}
});
});
I need to select by class? If I have more elements in a div with
id="div_id", can I use this id, and all elements will be passend from click
event?
>> On Fri, Nov 6, 2009 at 14:13, NMarcu <marcu.nico...@gmail.com> wrote:
>>> Hello all,
>>> I want to do something like this:
>>> On every click event, on the page, but except on specific element,
>>> with id="elem_id" to do something. The element with id="elem_id" need
>>> to update a table. And when I click on something else, that is not the
>>> element with id="elem_id" I want that table to come back on the
>>> original form. I'm intresting only in the jquery syntax, how can I
>>> select all page, without a specific element, on click event.
> I need to select by class? If I have more elements in a div with
> id="div_id", can I use this id, and all elements will be passend from click
> event?
>>> On Fri, Nov 6, 2009 at 14:13, NMarcu <marcu.nico...@gmail.com> wrote:
>>>> Hello all,
>>>> I want to do something like this:
>>>> On every click event, on the page, but except on specific element,
>>>> with id="elem_id" to do something. The element with id="elem_id" need
>>>> to update a table. And when I click on something else, that is not the
>>>> element with id="elem_id" I want that table to come back on the
>>>> original form. I'm intresting only in the jquery syntax, how can I
>>>> select all page, without a specific element, on click event.
>> I need to select by class? If I have more elements in a div with
>> id="div_id", can I use this id, and all elements will be passend from click
>> event?
>>>> On Fri, Nov 6, 2009 at 14:13, NMarcu <marcu.nico...@gmail.com> wrote:
>>>>> Hello all,
>>>>> I want to do something like this:
>>>>> On every click event, on the page, but except on specific element,
>>>>> with id="elem_id" to do something. The element with id="elem_id" need
>>>>> to update a table. And when I click on something else, that is not the
>>>>> element with id="elem_id" I want that table to come back on the
>>>>> original form. I'm intresting only in the jquery syntax, how can I
>>>>> select all page, without a specific element, on click event.
> >> I need to select by class? If I have more elements in a div with
> >> id="div_id", can I use this id, and all elements will be passend from click
> >> event?
> >>>> On Fri, Nov 6, 2009 at 14:13, NMarcu <marcu.nico...@gmail.com> wrote:
> >>>>> Hello all,
> >>>>> I want to do something like this:
> >>>>> On every click event, on the page, but except on specific element,
> >>>>> with id="elem_id" to do something. The element with id="elem_id" need
> >>>>> to update a table. And when I click on something else, that is not the
> >>>>> element with id="elem_id" I want that table to come back on the
> >>>>> original form. I'm intresting only in the jquery syntax, how can I
> >>>>> select all page, without a specific element, on click event.
> > >> I need to select by class? If I have more elements in a div with
> > >> id="div_id", can I use this id, and all elements will be passend from click
> > >> event?
> > >>>> On Fri, Nov 6, 2009 at 14:13, NMarcu <marcu.nico...@gmail.com> wrote:
> > >>>>> Hello all,
> > >>>>> I want to do something like this:
> > >>>>> On every click event, on the page, but except on specific element,
> > >>>>> with id="elem_id" to do something. The element with id="elem_id" need
> > >>>>> to update a table. And when I click on something else, that is not the
> > >>>>> element with id="elem_id" I want that table to come back on the
> > >>>>> original form. I'm intresting only in the jquery syntax, how can I
> > >>>>> select all page, without a specific element, on click event.