Plugin Directory

Changeset 1434168


Ignore:
Timestamp:
06/09/2016 09:19:37 PM (10 years ago)
Author:
KCPT
Message:

Fixed add image button js not binding when new widget added

Location:
kcpt-fading-image-widget/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • kcpt-fading-image-widget/trunk/kcpt-fading-image-widget.js

    r1042810 r1434168  
    11(function($) {
    22    $(document).ready(function() {
    3         $('.insert-kcpt-image').click(function(e) {
    43
     4
     5        window.fiwInsertImage = function(e) {
    56            e.preventDefault();
    67
     
    3536            //Open modal
    3637            custom_file_frame.open();
     38        };
     39
     40        window.bindFadingImageWidget = function() {
     41            $('.insert-kcpt-image').off('click', fiwInsertImage);
     42            $('.insert-kcpt-image').on('click', fiwInsertImage);
     43        };
     44
     45
     46        bindFadingImageWidget();
     47
     48        $(document).on('widget-added', function(e, widget) {
     49            bindFadingImageWidget();
    3750        })
     51
     52
    3853    });
    3954})(jQuery);
  • kcpt-fading-image-widget/trunk/kcpt-image-widget.php

    r1042810 r1434168  
    44 * Plugin URI: http://www.KCPT.org/
    55 * Description: A simple image widget which will fade another image through on hover.
    6  * Version: 0.0.4
     6 * Version: 0.0.5
    77 * Author: Steven Kohlmeyer
    88 * Author URI: http://StevenKohlmeyer.com
  • kcpt-fading-image-widget/trunk/readme.txt

    r1042810 r1434168  
    44Tags: widget, image, image widget
    55Requires at least: 3.5
    6 Tested up to: 4.1
    7 Stable tag: 0.0.4
     6Tested up to: 4.5.2
     7Stable tag: 0.0.5
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    3030== Changelog ==
    3131
     32= 0.0.5 =
     33* Fixed buttons not working when you first add the widget to the screen
     34
    3235= 0.0.3 =
    3336* Disabled Fade feature if both images aren't specified
Note: See TracChangeset for help on using the changeset viewer.