From c505bad991dae2766a900f1ad22440fb31129a84 Mon Sep 17 00:00:00 2001 From: Aristeides Stathopoulos Date: Mon, 2 May 2016 18:37:46 +0300 Subject: [PATCH] possible fix for #957 --- assets/js/postmessage.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/assets/js/postmessage.js b/assets/js/postmessage.js index b5bc7413c..2e5deea58 100644 --- a/assets/js/postmessage.js +++ b/assets/js/postmessage.js @@ -65,7 +65,11 @@ // Inject HTML if ( 'html' === args['function'] ) { - jQuery( args.element ).html( val ); + if ( 'undefined' !== typeof args.attr && undefined !== args.attr ) { + jQuery( args.element ).attr( args.attr, val ); + } else { + jQuery( args.element ).html( val ); + } // Add CSS } else {