Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script type="text/javascript">
- $(document).ready(function() {
- //alert('entire page reloaded and ready');
- var selectedPlan = window.location.hash.substr(1);
- $("#edit-attributes-43").live("change", function(){
- if ($(this).val() !== selectedPlan) {
- window.location = window.location.href.replace(/#.*$/, '') + '#' + $(this).val();
- window.location.reload();
- $('form').clearForm()
- }
- });
- });
- </script>
- <script type="text/javascript">
- $.fn.clearForm = function() {
- return this.each(function() {
- var type = this.type, tag = this.tagName.toLowerCase();
- if (tag == 'form')
- return $(':input',this).clearForm();
- if (type == 'text' || type == 'password' || tag == 'textarea')
- this.value = '';
- else if (type == 'checkbox' || type == 'radio')
- this.checked = false;
- else if (tag == 'select')
- this.selectedIndex = -1;
- });
- };
- </script>
Add Comment
Please, Sign In to add comment