All Downloads are FREE. Search and download functionalities are using the official Maven repository.

js.ano-upload.js Maven / Gradle / Ivy


(function($){
    $.fn.anoUpload = function(options) {
        var PLUGIN_NAME = "anoUpload";
        var settings = {
            refreshTime: 1000
        },
            data = this.data(PLUGIN_NAME);
        if(data) {
            data.target.remove();
            clearTimeout(data.timer);
            settings = data.settings;
        } else {
            data = {};
            data.settings = settings;
            data.actionUrl = this.attr('action');
            this.data(PLUGIN_NAME, data);
        }
        data.uploading = false;
        if(options) {
            $.extend(settings,options);
        }
        var $this = this;
        var name = this.attr('name') + 'iframe';
        data.target = $('