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

Untitled

By: a guest on Jun 20th, 2012  |  syntax: None  |  size: 0.77 KB  |  hits: 10  |  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. Fire click / touchstart event with jqTouch functionallity on iPad
  2. $.ajax({
  3.     url : 'searchServlet',
  4.     type : 'GET',
  5.     data : JSON.stringify(jsonParams),
  6.     timeout : 2000,
  7.     dataType : "json",
  8.     error : function(xhr, ajaxOptions, thrownError)
  9.     {
  10.         console.error("Ajax searchServlet " +xhr.responseText);
  11.     },
  12.     success : function(searchResult)
  13.     {
  14.         var results = $("#results_from_server");
  15.         results.empty();
  16.         for(i=0; i < searchResult.length; i++)
  17.         {
  18.             $('<li>').append(createVideoItem(searchResult[i].name)).appendTo(results);              
  19.         }
  20.         $('body').append('<a id="tempID" href="#next"></a>');
  21.         $('#tempID').click();
  22.         $('#tempID').remove();
  23.     }
  24.        
  25. $('#tempID').trigger('click');