Permalink
Browse files

js external

  • Loading branch information...
1 parent 94cab7a commit ee5bb76a42a522401392761faae9b4aa0fe8850b Benjamin Pick committed May 4, 2012
Showing with 13 additions and 0 deletions.
  1. +13 −0 js/wpcf-select-box.js
View
@@ -0,0 +1,13 @@
+// Contact Form 7 Select Box Editor Button
+// @see http://wordpress.org/extend/plugins/contact-form-7-select-box-editor-button/
+
+function wpcf7_update_select()
+{
+ var value = decodeURIComponent(window.location.hash.substring(1).replace(/\+/g, '%20'));
+ jQuery('#recipient').val(value);
+}
+
+jQuery(document).ready(function() {
+ wpcf7_update_select();
+ jQuery('.wpcf7-form').bind('reset', wpcf7_update_select);
+});

0 comments on commit ee5bb76

Please sign in to comment.