Problem when applying Jquery Pop up on e-commerce platform

Asked

Viewed 136 times

3

I am working with an e-commerce platform, in this case the integrated store. I have access to include html to customize, but the code is enabled for all pages of the site, there is something I can do so that stay only at home under the current conditions I am?

$(document).ready(function() {

    var maskHeight = $(document).height();
    var maskWidth = $(window).width();

    $('#mask').css({'width':maskWidth,'height':maskHeight});

    $('#mask').fadeIn(1000);  
    $('#mask').fadeTo("slow",0.8);

    //Get the window height and width
    var winH = $(window).height();
    var winW = $(window).width();

    $('#dialog2').css('top',  winH/2-$('#dialog2').height()/2);
    $('#dialog2').css('left', winW/2-$('#dialog2').width()/2);

    $('#dialog2').fadeIn(2000); 

  $('.window .close').click(function (e) {
    e.preventDefault();

    $('#mask').hide();
    $('.window').hide();
  });   

  $('#mask').click(function () {
    $(this).hide();
    $('.window').hide();
  });     

});
  • Use the [Edit] button to add more information to it.

  • Welcome to Sopt, could you put up a print showing the problem ? already gave to understand that you are suffering an effect in cascade for loading this script in all pages, but wanted to know exactly how it occurs and which platform is

  • Already managed to solve the problem, as I close this question not to hold the attention of the people who come to help?

  • Answer the question with the solution to the problem. You won’t be able to mark as an answer because of the reputation (I think).

1 answer

-1

Well the problem was solved without the need to change something, I managed to put this pop up only at home through the platform.

Thank you

  • 5

    Can you explain how you did it? The same solution you found can help and be useful to other users.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.