matthieua / WOW

Reveal CSS animation as you scroll down a page
https://www.delac.io/WOW/
9.91k stars 4.11k forks source link

IE 10 DOM mutations - hidden div issue #207

Open jimmywiddle opened 9 years ago

jimmywiddle commented 9 years ago

Hi, Having issues here with IE10 wow.js and a livehelp (livehelperchat.com) which the livehelp status div which is hidden.

Im aware this is because IE 10 cannot detect DOM mutations and you have to add the wow.sync but I cannot correctly add this to get things working, any help would be so much appreciated.

Have tried adding in the wow.sync here:

var wow = new WOW();
var htmlStatus = '<div id="lhc_status_container" class="wow bounceInUp" data-wow-delay="0.3s" style="visibility:hidden;">'+subStatus+statusTEXT+'</div>';
var fragment = this.appendHTML(htmlStatus);
document.body.insertBefore(fragment, document.body.childNodes[0]);
wow.sync();

Also tried on the js script embed code:

var wow = new WOW();
var LHCChatOptions = {};
LHCChatOptions.opt = {widget_height:340,widget_width:300,popup_height:520,popup_width:500,domain:'mydomain.co.uk'};
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
var referrer = (document.referrer) ? encodeURIComponent(document.referrer.substr(document.referrer.indexOf('://')+1)) : '';
var location  = (document.location) ? encodeURIComponent(window.location.href.substring(window.location.protocol.length)) : '';
po.src = 'https://secure.mydomain.co.uk/livehelp/index.php/chat/getstatus/(click)/internal/(position)/bottom_right/(ma)/br/(hide_offline)/true/(check_operator_messages)/true/(top)/350/(units)/pixels/(leaveamessage)/true/(department)/1/(noresponse)/true?r='+referrer+'&l='+location;
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
wow.sync();

Also tried as a callback on the js script embed code:

var LHCChatOptions = {};
LHCChatOptions.opt = {widget_height:340,widget_width:300,popup_height:520,popup_width:500,domain:'mydomain.co.uk'};
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
var referrer = (document.referrer) ? encodeURIComponent(document.referrer.substr(document.referrer.indexOf('://')+1)) : '';
var location  = (document.location) ? encodeURIComponent(window.location.href.substring(window.location.protocol.length)) : '';
po.src = 'https://secure.mydomain.co.uk/livehelp/index.php/chat/getstatus/(click)/internal/(position)/bottom_right/(ma)/br/(hide_offline)/true/(check_operator_messages)/true/(top)/350/(units)/pixels/(leaveamessage)/true/(department)/1/(noresponse)/true?r='+referrer+'&l='+location;
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();

LHCChatOptions.callback = {
show_widget_cb:function(inst){
wow.sync();
}};

Im not having any luck here, any help would be so much appreciated! Thanks in advance!

JayHoltslander commented 9 years ago

@jimmywiddle Did you ever get this sorted out?

jimmywiddle commented 9 years ago

no im still trying, are you having the same issue? dont know if this might help too, i want to double check these methods: https://forum.livehelperchat.com/viewtopic.php?id=1400&p=2

jimmywiddle commented 8 years ago

@JayHoltslander Just coming back to this now, did you have any luck?