dont have loading video twice
This commit is contained in:
parent
e1622b6a10
commit
08e9398ab3
|
@ -47,12 +47,12 @@
|
|||
'callback': function() { $.noop(); } //function to call after done instantiating pandoraVideo object, called with the object.
|
||||
}, dataOptions),
|
||||
id = opts.id,
|
||||
$loading = $('<div />').addClass("pandoraLoading").text("Loading video...").appendTo($this),
|
||||
//$loading = $('<div />').addClass("pandoraLoading").text("Loading video...").appendTo($this),
|
||||
sendData = JSON.stringify({'id': id, 'keys': opts.keys});
|
||||
|
||||
//get the pandora id and instantiate a pandoraVideo object with the current element and render it and execute optional callback
|
||||
var deferred = $.post(opts.api, {'action': opts.action, 'data': sendData}, function(response) {
|
||||
$loading.hide().remove();
|
||||
//$loading.hide().remove();
|
||||
var pandora = new PandoraVideo(id, response.data, $this, opts);
|
||||
pandora.render();
|
||||
opts.callback(pandora);
|
||||
|
|
Loading…
Reference in New Issue
Block a user