Results 1 to 3 of 3

Thread: click function

  1. #1
    Augus is offline Member
    Join Date
    Oct 2011
    Posts
    1
    Rep Power
    0

    Question click function

    Dear forum users,

    I got an litle problem which i cant resolve myself. I tried severale things but all failed. its about the following:

    I fot an div #hidearrow in my another div #infobox that should fade the #infobox. And this does work in the following mather:

    XML Code:
    <div id="hidearrow" onclick='$("#infobox").fadeOut("slow");'></div>
    But now i dont want the click function inline but outline. I tried this as followed:

    in the body:

    XML Code:
    <div id="hidearrow"></div>
    in the head:

    Java Code:
    <script>
    		$("#hidearrow").click(function() {
    			$("#infobox").fadeOut("slow");
    		});
    		</script>
    But this isn't working. And i hope you guys/girls know what i did wrong.

    Kind regards,

    Augus

  2. #2
    eRaaaa is offline Senior Member
    Join Date
    Oct 2010
    Location
    Germany
    Posts
    787
    Rep Power
    6

    Default Re: click function


  3. #3
    doWhile is offline Moderator
    Join Date
    Jul 2010
    Location
    California
    Posts
    1,642
    Rep Power
    7

    Default Re: click function

    java != javascript. These are java forums...you might try your luck on javascript dedicated forum.

Similar Threads

  1. Replies: 2
    Last Post: 06-22-2011, 01:19 PM
  2. validurl function not working when I click the submit button
    By kritijain in forum JavaServer Pages (JSP) and JSTL
    Replies: 7
    Last Post: 06-10-2011, 11:22 AM
  3. Calling function in Javascript- from other function
    By jdigger in forum New To Java
    Replies: 1
    Last Post: 02-27-2011, 09:00 PM
  4. drag and drop with click function
    By zwanz in forum AWT / Swing
    Replies: 1
    Last Post: 05-18-2010, 09:56 PM
  5. Replies: 3
    Last Post: 12-04-2009, 03:08 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •