Results 1 to 2 of 2

Thread: The rel attribute and scripting.

  1. #1
    Join Date
    Apr 2008
    Location
    San Diego, CA
    Posts
    352
    Thanks
    57
    Thanked 6 Times in 6 Posts

    Default The rel attribute and scripting.

    Hi all,

    As many other developers before me, I often use the "rel" attribute on links to pass along some data to a Javascript function. Usually this data corresponds to an identifier for a related element - the class name of a group of images to be hidden, the ID of a DIV, etc.

    What do y'all use to pass data from elements that aren't links, like a DIV? I usually use a hidden input as the first or last child, but I'm wondering you guys use.

    Thanks!
    My site: FreshCut :)

  2. #2
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    1,160
    Thanks
    17
    Thanked 277 Times in 275 Posts

    Default

    The ID, class, and/or title attributes would come handy.
    Learn how to code at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph!

Tags for this Thread

Bookmarks

Posting Permissions

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