lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi list,

Let me ask another question about the sample orbit app todo.

I want to know why there are $$s not $.
For the sentence below,
$$(".remove").click(function () {
Why isn't it shows like below?
$(".remove").click(function () {

Why there used double '$'?

todo.index = [===[

  <html>
  <head>
  <title>To-do List</title>
  <script type="text/_javascript_" src="" '/jquery-1.2.3.min.js' }"></script>
  <script>
  function set_callbacks() {
    $$(".remove").click(function () {
      $$("#items>[item_id=" + $$(this).attr("item_id") +"]").slideUp("slow");
    $$("#items").load("$link{ '/remove/'}" + $$(this).attr("item_id"), {},
      function () { set_callbacks(); });
    });
    $$(".item").click(function () {
      $$.post("$link{ '/toggle/' }" + $$(this).attr("item_id"), {});
    });
  }

  $$(document).ready(function () {
    $$("#add").submit(function () {
      $$("#button").attr("disabled", true);
      $$("#items").load("$link{ '/add' }", { item: $$("#title").val()  },
        function () { $$("#title").val(""); set_callbacks();
        $$("#button").attr("disabled",false); });
      return false;
    });
    set_callbacks();
  });

Thank you very much in advance!
Journeyer
----------------------------------------
Journeyer J. Joh
o o s a p r o g r a m m e r
a t
g m a i l  d o t  c o m
----------------------------------------