Sha256: 0ec65e0e05bff8c31921b43fcfacdd9492311a2a896ce3e3aca691d035f45f57
Contents?: true
Size: 822 Bytes
Versions: 28
Compression:
Stored size: 822 Bytes
Contents
$(function(){ $(document).on("click","td.with-nested-list a, tr.with-nested-list",function(event){ event.preventDefault() var was_active = $(this).data("active") $("td.with-nested-list a, tr.with-nested-list").data("active",false) $(this).data("active",true) if($(this).prop("tagName") == "A"){ var $tr = $(this).parents("tr").eq(0) var url = $(this).parent().data("nested-list-url") }else{ $tr = $(this) url = $(this).data("nested-list-url") } if(was_active && $tr.next().hasClass("nested-list")){ $tr.next().remove() $(this).data("active",false) }else{ $.get(url,function(data){ if($tr.next().hasClass("nested-list")){ $tr.next().replaceWith(data) }else{ $tr.after(data) } }) } }) })
Version data entries
28 entries across 28 versions & 1 rubygems