<input type="text" id="tagsauto" name="mytags" />
    <ul id="mytags"></ul>
    <input name="videoid" type="hidden" value="" id="savetag_videoid" />
    <input name="videothumb" type="hidden" value="" id="savetag_videothumb" />
    <input name="videotitle" type="text" value="" id="savetag_videotitle" />
    <br />
    <input type="submit" value="I love this song!!!" id="buttonsavetag" />
    </form>
    

</div>

<script type="text/javascript" charset="utf-8">
$(document).ready(function(){
  $("#tagsauto").autocomplete({
    source: "<?php echo generate_url_from_routing("api/tags/my/autocomplete");?>",
    width: 320,
    max: 10,
    minLength: 1,
    multiple: false,
    //multipleSeparator: ",",
    scroll: true,
    scrollHeight: 300
  });
});

$('#formsavetag').submit(function(event) {
  // stop form from submitting normally
  event.preventDefault();
  // get some values from elements on the page:
  var form = $( this );
Пример #2
0
    $("#tabs").tabs({ selected: tabselected });
    $("#cmdSearch").button();
    $("#cmdShareSearch").button();
    $("#cmdSuggestMe").button();
    /*
    $("#txtSearch").autocomplete({
        source: function( request, response ) {
          return ilts.autocompleteSearch(request, response);
        },
        minLength: 2
      });
    */
    $('#tabs').bind('tabsselect', function(event, ui) {
      if (ui.index == 2) {
        $.ajax({
          url: "<?php echo generate_url_from_routing("api/tags/my");?>",
          context: document.body,
          success: function(data){
            videos.loadLoved(data)
            
          }
        });
      }
      // Objects available in the function context:
      //alert (ui.tab);     // anchor element of the selected (clicked) tab
      //alert(ui.panel);   // element, that contains the selected/clicked tab contents
      //alert(ui.index);   // zero-based index of the selected (clicked) tab

   });
     
  });