need help jquery

Discussion in 'Programming' started by Unfodos, Nov 26, 2016.

  1. Unfodos

    Unfodos Junior Member

    Joined:
    Mar 10, 2014
    Messages:
    180
    Likes Received:
    77
    Gender:
    Male
    Occupation:
    Webmaster
    Location:
    www
    hello guys i am trying the whole night to clone chaturbate Instant Messenger Ads pop up to promote my own offers but i failed
    Code:
    myjQuery=null;var chaturbate_popup={};var css_str='<style type="text/css">';css_str+='#chatbox {display:none;z-index:100;margin:0;padding:0;}';css_str+='#chatbox a {text-decoration:none;}';css_str+='#chatbox a img {border:0;}';css_str+='#chatbox {width:270px;position:fixed;bottom:-1px;height:210px;right:0px;}';css_str+='#chatbox .close {position: absolute; display: block;float: right;width: 25px;height: 22px;margin-left: 213px;}';css_str+='#chatbox .open {width: 240px;height: 210px;}';css_str+='#chatbox #background {width:240px;background:url(http://chaturbate.com/static/affiliates/banners/240x210a.gif);height:210px;margin-right:15px;float:right;}';css_str+='</style>';document.write(css_str);chaturbate_popup.createPopup=function(){var str='<div id="chatbox" class="chatbox">';str+='<div id="background">';str+='<a href="#close" class="nooverlay"><div class="close" id="im_close"></div></a>';str+='<a href="http://chaturbate.com/affiliates/in/?tour=&campaign=&track=" target="_blank"><div class="open"></div></a>';str+='</div>';var popup=document.createElement('div');popup.id="im_popupDiv";popup.name="popupDiv";var newcontent=document.createElement('div');newcontent.id="im_popupFixed";newcontent.appendChild(popup);popup.innerHTML=str;var scr=document.getElementById('popupJS');scr.parentNode.insertBefore(newcontent,scr);};chaturbate_popup.closePopup=function(){var divBG=document.getElementById('im_popupDiv');divBG.style.display='none';return false;};chaturbate_popup.startUp=function($){var closed=false;var next_timeout;var cookie_name='im_closed';var chatbox=$("#chatbox");chaturbate_popup.createPopup();if($.cookie(cookie_name)=="1"){closed=true;}
    function showad(){if(!closed){$('#chatbox').animate({opacity:1,bottom:'0',height:'show'},2000,function(){next_timeout=setTimeout(hidead,7500);});}}
    function hidead(){$('#chatbox').animate({opacity:1,bottom:'0',height:'hide'},2000,function(){next_timeout=setTimeout(showad,4000);});}
    if(chatbox){setTimeout(showad,1000);}
    var x_close=document.getElementById('im_close');x_close.onclick=function(){$.cookie(cookie_name,'1',{expires:1,path:'/'});closed=true;$('#chatbox').animate({opacity:1,bottom:'0',height:'hide'},2000,function(){next_timeout=setTimeout(showad,7500);});return false;};}
    function doMyStuff($){myjQuery=$;$(document).ready(function(){$.getScript("https://chaturbate.com/static/js/jquery.cookie.noconflict.js",function(data,status){chaturbate_popup.startUp($);});});}
    function check(){if(window.jQuery&&jQuery.fn){var arr=jQuery.fn.jquery.split('.');if(arr.length>=2){if(arr[0]>1||(arr[0]==1&&arr[1]>=3)){return true;}}}
    return false;}
    if(check()){doMyStuff(jQuery);}else{var script=document.createElement('script');script.src='https://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js';window.addEventListener('load',function(){document.body.insertBefore(script,document.body.firstChild);var timer=setInterval(function(){if(check()){clearInterval(timer);document.body.removeChild(script);doMyStuff(jQuery.noConflict(true));}},30);});}
     
  2. webEsun

    webEsun Newbie

    Joined:
    Jul 19, 2011
    Messages:
    6
    Likes Received:
    0
    Hey , Please reach out to me at [email protected] if you are still looking for some one.
    Thanks