Wednesday 15 July 2015

php - jQuery not working in Chrome and IE -


I am working on a WordPress theme On the header I check that this is the first visit (the user has just entered the website).

If this is the first visit, the animation will appear. Animation = A sidebar appears in the middle of the page, it opens in some milliseconds and the page appears. In the code, ub_sb_closed_on_hp is an option that only sets the sidebar to display on the homepage.

It works under Mozilla, but it does not work under Internet Explorer and Chrome. Animation on IE and Chrome appears on all pages.

See code here:

Try these changes: < Pre> if ($ _SESSION ['first_time_ here'] == ''): // On the Set page to open (get_option ('ub_sb_closed_on_hp')! = 'Yes') {// print "?" Gt; If (jQuery (Window). With ()> 9 80) {jQuery ('# Page'). CSS ({'display': 'inline', 'width': '300px', 'overflow': 'hidden', 'margin-right': '340px'}); JQuery ('# sidebar'). CSS ({'margin-left': '326px'});} "" & lt ;? php}? & Gt;

Anything else:

  if (get_option ('ub_sb_closed_on_hp')! = 'Yes') {? & Gt; print "if (jQuery (window) .with ()> 980) {jQuery ('# sidebar'). Delay (800) .Met ({'margin-left': '0px'}, 2100); JQuery ('# Page'). Delay (800) .met ({margin-right ':' 0px ',' width ':' 666px '}, 2100);} ""; & Lt ;? Php}? & Gt; Edit 1: I could not see where you start  $ _ session ['first_ time_here'] . If you have not started it, then you can try the following changes  

find: if ($ _ session ['first_ time_ here'] == ''):

Change: if (! Isset ($ _ session ['first_time' ']')):

No comments:

Post a Comment