Basic example, replace .ajax-form with whatever form you want to select:
$('.ajax-form').snippet_ajax_form();
Example using options:
$.fn.snippet_ajax_form.defaults= { hide_on_success: true };
| {% block main %} | |
| {% set parent as hifi.get({'id': this.parent})[0] %} | |
| <h2>Series</h2> | |
| {{ parent.title }}<br><br> | |
| <h2>Title</h2> | |
| {{ this.title }}<br><br> | |
| <html> | |
| <head></head> | |
| <body style="background-color:#ffffff;margin:10px"> | |
| <script> | |
| var uploadFile = function(){ | |
| var text = document.getElementById('txt'); | |
| var dir = Titanium.Filesystem.getResourcesDirectory(); | |
| sep = Titanium.Filesystem.getSeparator(), | |
| // filename = 'test.txt', |
| <? | |
| // Import Framework | |
| require 'klein.php'; | |
| function visit($uri) { | |
| return dispatch($uri, null, null, true); | |
| } | |
| respond('GET', '/[:name]?', function ($request, $response){ | |
| $name = $request->param('name', 'World'); |
| <? | |
| // Import Framework | |
| require 'klein.php'; | |
| function visit($uri) { | |
| return dispatch($uri, null, null, true); | |
| } | |
| respond('GET', '/[:name]?', function ($request, $response){ | |
| $name = $request->param('name', 'World'); |
| <? | |
| // Import Framework | |
| require 'klein.php'; | |
| function visit($uri) { | |
| return dispatch($uri, 'GET', null, true); | |
| } | |
| respond('GET', '/', function ($request, $response) { | |
| // It shouldn't print Hello World to the browser, but it does..... |
| <? | |
| // Import Framework | |
| require 'klein.php'; | |
| respond('GET', '/hello/[:name]?', function ($request, $response) { | |
| $name = $request->param('name', 'World'); | |
| echo "Hello $name!"; | |
| }); | |
| // Run App |
| #!/bin/sh | |
| # | |
| # merge [branchname] | |
| # | |
| # Tries to merge local branch "branchname" into master, | |
| # regardless of what branch you are currently in. | |
| # It will stop you if you are behind & need to pull 1st | |
| # | |
| remote="origin" |
| " by CJ Lazell github.com/cj | |
| " based on - http://github.com/solars/github-vim/ | |
| if exists("loaded_github") || &cp | |
| finish | |
| endif | |
| " --- main functions --- " |
| // Start the hash change handling, returning `true` if the current URL matches | |
| // an existing route, and `false` otherwise. | |
| start : function() { | |
| var docMode = document.documentMode; | |
| var oldIE = ($.browser.msie && (!docMode || docMode <= 7)); | |
| if (oldIE) { | |
| this.iframe = $('<iframe src="javascript:0" tabindex="-1" />').hide().appendTo('body')[0].contentWindow; | |
| } | |
| if ('onhashchange' in window && !oldIE && ($.browser.msie || docMode >= 8)) { | |
| $(window).bind('hashchange', this.checkUrl); |