Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    May 2009
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Select any element

    Hi,

    It is possible to make a script that hides the element clicked and this way hide the items I want. I wonder: is there any tool that would help identifying the element I want to work on? I.e. give me the code for selecting it.

    Thanks!
    Last edited by Wilhelmi; 06-22-2009 at 01:48 PM.

  • #2
    Senior Coder A1ien51's Avatar
    Join Date
    Jun 2002
    Location
    Between DC and Baltimore In a Cave
    Posts
    2,717
    Thanks
    1
    Thanked 94 Times in 88 Posts
    Play with this

    Code:
    window.onclick = function(e){
        e = e || window.event;
        var elem = e.srcElement || e.target;
        alert(elem.innerHTML);
    }
    Eric
    Tech Author [Ajax In Action, JavaScript: Visual Blueprint]


  •  

    Posting Permissions

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