Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 1st, 2012  |  syntax: None  |  size: 0.45 KB  |  hits: 7  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. $(document).ready ->
  2.   unless $.browser.opera
  3.     $("select.option_id").each ->
  4.       title = $(this).attr("title")
  5.       title = $("option:selected", this).text()  unless $("option:selected", this).val() is ""
  6.       $(this).css(
  7.         "z-index": 10
  8.         opacity: 0
  9.         "-khtml-appearance": "none"
  10.       ).after("<span class=\"select\">" + title + "</span>").change ->
  11.         val = $("option:selected", this).text()
  12.         $(this).next().text val