mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 17:48:01 +01:00
2c4438f379
git-svn-id: http://svn.automattic.com/wordpress/trunk@19997 1a063a9b-81f0-0310-95a4-ce76da25c4cd
1 line
689 B
JavaScript
1 line
689 B
JavaScript
(function(a,c){var b=wp.customize;b.Preview=b.Messenger.extend({initialize:function(f,e){var d=this;c.extend(this,e||{});b.Messenger.prototype.initialize.call(this,f);this.body=c(document.body);this.body.on("click.preview","a",function(g){g.preventDefault();d.send("url",c(this).attr("href"))});this.body.on("submit.preview","form",function(g){g.preventDefault()});this.bind("url",function(g){this.url(g);this.refresh()})},refresh:function(){this.submit({target:this.iframe.prop("name"),action:this.url()})},submit:function(d){if(d){this.form.prop(d)}this.form.submit();if(d){this.form.prop(this._formOriginalProps)}}});c(function(){var d;d=new b.Preview(b.settings.parent)})})(wp,jQuery); |