Plugin Directory

Changeset 1533326


Ignore:
Timestamp:
11/13/2016 04:50:50 PM (9 years ago)
Author:
mycodingtricks
Message:

Fixed Scroll bug in moptin.js

Location:
moptin-email-subscription-optin-form/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • moptin-email-subscription-optin-form/trunk/index.php

    r1507199 r1533326  
    44 * Plugin URI: http://mycodingtricks.com
    55 * Description: Moptin is a Email Opt-in WordPress Plugin
    6  * Version: 2016.10.3
     6 * Version: 2016.11.13
    77 * Author: Shubham Kumar
    88 * Author URI: http://mycodingtricks.com
     
    1010 * Network: true
    1111*/
    12 $ver = "2016.10.2.1";
    1312include __DIR__.'/moptin-post-type.php';
    1413include __DIR__.'/meta-box.php';
     
    1615function load_Moptin(){
    1716    global $ver;
    18     wp_enqueue_script('moptin_js',plugins_url('moptin.js',__FILE__),array('jquery'),$ver);
    19     wp_enqueue_style('moptin_css',plugins_url('style.css',__FILE__),15);
     17    wp_enqueue_script('moptin_js',plugins_url('moptin.js',__FILE__),array('jquery'),"2016.11.13");
     18    wp_enqueue_style('moptin_css',plugins_url('style.css',__FILE__),15,'2016.11.13');
    2019    wp_enqueue_style('Montserrat','https://fonts.googleapis.com/css?family=Montserrat:700,400');
    2120}
  • moptin-email-subscription-optin-form/trunk/moptin.js

    r1507199 r1533326  
    1212            body = $("body"),
    1313            id = $self.attr("id"),
     14            forcedToClose=false,
    1415            delay=0,
    1516            scrollOffset=0,
     
    4647            }
    4748        };
    48         self.close = function(id){
    49            
     49        self.close = function(id){           
     50            forcedToClose=true;
    5051            $self.fadeOut(300,function(){
    5152                if($self.hasClass("moptin-takeover")){
     
    125126        };
    126127        self.show = function(){
     128            if(forcedToClose) return false;
    127129            $self.fadeIn(500,function(){
    128130                self.centerImg();
     
    140142                $(document).scroll(function(){
    141143                    var scrollTop = $(this).scrollTop();
    142                     if(scrollTop>settings.scrollOffset) self.show();
     144                    if(scrollTop>settings.scrollOffset && $("#"+id).length>0) self.show();
    143145                });
    144146            }else if($self.hasClass("moptin__display-exit")){
     
    157159        self.OptimiseForScroll = function(){
    158160            if($self.hasClass("moptin-takeover")){
     161//                console.log(self);
     162//                console.log($(self));
    159163                body.addClass("moptin-takeover-body");
    160164            }
  • moptin-email-subscription-optin-form/trunk/readme.txt

    r1507199 r1533326  
    55Requires at least: 3.1
    66Tested up to: 4.6
    7 Stable tag: 2016.10.3
     7Stable tag: 2016.11.13
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    44441. Added some more options in Admin Panel.
    45452. Cleaned some code.
     46
     47== 2016.11.13 ==
     48
     491.Fixed Scroll Bug
Note: See TracChangeset for help on using the changeset viewer.