Hola David, como va?

Mira, aca le digo que CUANDO se haga click en un link con atributo
REL=bus, dentro del DIV body, se ejecute la funcion

$('#body').find('[EMAIL PROTECTED]').bind("click", function (){alert('se
hizo click sobre link REL=bus');});

En tu caso es:

 $(document).ready(function() {
...

$('#content').find('[EMAIL PROTECTED]').click( function ()
{
alert('Hola caracola');
}
);

...});

Espero eso te ayude en algo.
Saludos!
Santiago.

On Aug 6, 7:12 pm, David Garcia Ortega <[EMAIL PROTECTED]> wrote:
> Hi JQueriers,
>
>    I have a question for you. Well, my problem is the following:
>
>    In .js file and inside $(document).ready, I have the following
> code:
>
>  $(document).ready(function() {
>     ....
>        $('#menu').find('a').eq(0).click( function ()
>                 {
>                         $('#content').load('html/senas_identidad.html');
>                 }
>         );
>    ...
>
>    Well, when I click on the first link of the menu div, the hmtl file
> "senas_identidad.html" loads correctly inside the content div.
>
>    The content of "senas_identidad.html" (stupid content) is:
>
> <h1>Señas de iasdfasdasddfsadfs</h1>
> <input type="button" title="Publicar novedades seleccionadas"
> value="Publicar" name="Publicar" />
> <input type="button" title="Publicar novedades seleccionadas"
> value="C" name="Publicar" />
> <p> hola </p>
>
>    Now, I would like that when the user presses the button which value
> is "Publicar", an alert message is shown.
>    First I tried putting the following code inside $(document).ready:
>
>  $(document).ready(function() {
> ...
>         $('#content').find('[EMAIL PROTECTED]
> [EMAIL PROTECTED]').click( function ()
>                 {
>                         alert('Hola caracola');
>                 }
>         );
> ...
>
>    But it doesn't work. It doesn´t execute. I think that has sense
> because $(document).ready function only executes when the page is
> being loaded and it's ready to be manipulated.
>
>    Secondly, I tried to put the same code but out of $
> (document).ready:
>
>  $(document).ready(function() {
>    ....
>  });
>
> $('#content').find('[EMAIL PROTECTED]
> [EMAIL PROTECTED]').click( function ()
> {
>         alert('Hola caracola');
>
> }
>
>    I don't know if it is correct but it doesn't work.
>
> Any ideas of how can I associate a click event handler on button which
> value is "Publicar"?
>
> Thanks a lot!!!
>
> P.D. : I am a javascript and JQuery newbie, so sorry if it is a stupid
> error.

Reply via email to