Replace zopim live chat if div exists?

Hi,
i am using zopim live chat on a website and I would like a different offset depending on if a div exists or not. I can’t get it working tho.

Code:

  $zopim(function() {
      if($('.js-steps').lenght){
        $zopim.livechat.button.setOffsetVertical(82);
      } else {
        $zopim.livechat.button.setOffsetVertical(0);
      }
  });  

Is anything wrong with my code here?

Don’t know about the rest of the code but is that a typo in here or a typo on your real page?

i.e. it should be length

1 Like

I was sure it was spelled lenght… I blame this on beeing swedish:P

2 Likes

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.