Created
March 27, 2019 15:26
-
-
Save WordPress-Handbuch/8ff4952f5d80069fe66a3dc485a4b67a to your computer and use it in GitHub Desktop.
WordPress 5 plugin admin js code for the backend preview part of the WH Eyecatcher example project https://wordpress.org/plugins/wh-eyecatcher/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery(document).ready(function( $ ){ | |
jQuery('select#wh_eyecatcher_style').on('change', function () { | |
$("textarea#wh_eyecatcher_css").val(this.value); | |
$("div#wh-eyecatcher").attr("style",this.value); | |
}); | |
jQuery('textarea#wh_eyecatcher_css').on('change keyup paste', function () { | |
$("div#wh-eyecatcher").attr("style",this.value); | |
}); | |
jQuery('input#wh_eyecatcher_slogan').on('change keyup paste', function () { | |
$("div#wh-eyecatcher").html($("input#wh_eyecatcher_slogan").attr("value")); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment