title: jquery- phalcon submit button click
body: <p>I am working with Phalcon framework. I have a <code>Tag::SubmitButton</code> in my view, and i want to create a JQuery <code>on-click</code> function. For example, when a user clicks on the <code>submit</code> button, show simple alert message. When I click on my submit button, nothing happens. Here is my view code:</p>
  
  <pre><code>&lt;?php
      echo Phalcon\Tag::javascriptInclude("http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js", false);
      echo Phalcon\Tag::javascriptInclude("javascript/jquery.js");
  ?&gt;
      &lt;script type="text/javascript"&gt;
          $(document).ready(function(){
              //alert($("#nesto").val());
              atr = $(".klasa").attr("id");
              alert("Id je: " + atr);
  
              $("#dugmic").click(function(){
                  alert("Some message");
              });
          });
      &lt;/script&gt;
  
      &lt;h2&gt;Basic example&lt;/h2&gt;
  
      &lt;?php echo Tag::form("xml/pretraga"); ?&gt;
  
      &lt;p&gt;
          &lt;label for="title"&gt;Title&lt;/label&gt;
          &lt;?php $opt = array('title', 'id'=&gt;'nesto', 'size'=&gt;'10');
              $buttopt = array('Show', 'id'=&gt;'dubmic','class'=&gt;'klasa');
          ?&gt;
          &lt;?php echo Tag::textField($opt) ?&gt;
      &lt;/p&gt;
      &lt;p&gt;
          &lt;?php echo Tag::SubmitButton($buttopt) ?&gt;
      &lt;/p&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>I would appreciated any help. </p>