Pop out Chat Hitskin_logo Hitskin.com

This is a Hitskin.com skin preview
Install the skinReturn to the skin page

The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.
3 posters

    Pop out Chat

    Emily901
    Emily901
    New Member


    Female Posts : 23
    Reputation : 3
    Language : English

    Pop out Chat Empty Pop out Chat

    Post by Emily901 November 8th 2015, 9:23 pm

    Im trying to get my chatbox up more out of the corner.

    [img]Pop out Chat Need_h10[/img]

    I want it on the right still but more towards the middle right of the page.


    Code:
    $(function() {
      window.$chatBoxLateral = {
        open : 'http://i21.servimg.com/u/f21/19/08/97/95/cresce18.png',
        close : 'http://i21.servimg.com/u/f21/19/08/97/95/cresce17.png',
        height : '400px',
        width : '800px',

        toggle : function() {
          var container = document.getElementById('chatbox_container').style;

          if (this.src == $chatBoxLateral.open) {
            container.width = $chatBoxLateral.width;
            this.src = $chatBoxLateral.close;
          } else {
            container.width = '0px';
            this.src = $chatBoxLateral.open;
          }
         
        }
      };

      var container = document.createElement('DIV'),
          button = document.createElement('IMG'),

          // container styles
          style = {
            height : '-1px',
            width : '0px',
            position : 'fixed',
            right : '0px',
            bottom : '0px',
            zIndex : '99999',
            transition : '300ms'
          }, i;

      button.id = 'chatbox_button';
      button.src = $chatBoxLateral.open;
      button.style.position = 'absolute';
      button.style.left = '-100px';
      button.onclick = $chatBoxLateral.toggle;

      container.id = 'chatbox_container';
      container.innerHTML = '<iframe src="/chatbox" style="width:100%;height:100%;border:none;"></iframe>';
      container.insertBefore(button, container.firstChild);

      for (i in style) container.style[i] = style[i];

      document.body.appendChild(container);
    });
    EndlessDream
    EndlessDream
    Forumember


    Male Posts : 107
    Reputation : 22
    Language : English, Spanish, Serbian

    Pop out Chat Empty Re: Pop out Chat

    Post by EndlessDream November 9th 2015, 3:07 am

    If I understood well, try this:

    Code:
    $(function() {
              window.$chatBoxLateral = {
                open : 'http://i21.servimg.com/u/f21/19/08/97/95/cresce18.png',
                close : 'http://i21.servimg.com/u/f21/19/08/97/95/cresce17.png',
                height : '400px',
                width : '800px',
           
                toggle : function() {
                  var container = document.getElementById('chatbox_container').style;
           
                  if (this.src == $chatBoxLateral.open) {
                    container.width = $chatBoxLateral.width;
                    this.src = $chatBoxLateral.close;
                  } else {
                    container.width = '0px';
                    this.src = $chatBoxLateral.open;
                  }
               
                }
              };
           
              var container = document.createElement('DIV'),
                  button = document.createElement('IMG'),
           
                  // container styles
                  style = {
                    height : '500px',
                    width : '0px',
                    position : 'fixed',
                    right : '0px',
                    bottom : '0px',
                    zIndex : '99999',
                    transition : '300ms'
                  }, i;
           
              button.id = 'chatbox_button';
              button.src = $chatBoxLateral.open;
              button.style.position = 'absolute';
              button.style.left = '-100px';
              button.onclick = $chatBoxLateral.toggle;
           
              container.id = 'chatbox_container';
              container.innerHTML = '<iframe src="/chatbox" style="width:100%;height:100%;border:none;"></iframe>';
              container.insertBefore(button, container.firstChild);
           
              for (i in style) container.style[i] = style[i];
           
              document.body.appendChild(container);
            });

    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51554
    Reputation : 3524
    Language : English
    Location : United States

    Pop out Chat Empty Re: Pop out Chat

    Post by SLGray November 9th 2015, 4:00 am




    Pop out Chat Slgray10

    When your topic has been solved, ensure you mark the topic solved.
    Never post your email in public.