Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function configUpdate() {
- var config = getConfig();
- config.success(function (data) {
- var result = (data === '1') ? true : false;
- if(result) {
- iniciar();
- }
- setTimeout(configUpdate, 500);
- });
- }
- function iniciar() {
- return $.ajax({
- url: "/getVideo.php",
- cache: false,
- success: function(html) {
- $('#video').html(html);
- $('#video').css('display', 'inherit');
- setTimeout(function() {
- $('#video').css('display', 'none');
- setTimeout(switchOff,1000);
- }, 3000);
- }
- });
- }
- function switchOff() {
- $.ajax({
- url: "/switchOff.php",
- cache: false
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement