Difference between revisions of "User:Markhurd/common.js"

From Wikimedia Australia
Jump to navigation Jump to search
(Trying to get submitSpam to focus the submit button...)
 
(try not specifying a type)
Line 1: Line 1:
 
// when id="submitSpam" onclick="document.getElementById('wpComment').style.display='none';form.elements[11].focus()"
 
// when id="submitSpam" onclick="document.getElementById('wpComment').style.display='none';form.elements[11].focus()"
 
$(document).ready(function() {
 
$(document).ready(function() {
         $('radio.submitSpam').click(function() {
+
         $('.submitSpam').click(function() {
 
             document.getElementById('wpComment').style.display='none';
 
             document.getElementById('wpComment').style.display='none';
 
             form.elements[11].focus();
 
             form.elements[11].focus();
 
         });
 
         });
 
     });
 
     });

Revision as of 17:19, 20 April 2013

// when id="submitSpam" onclick="document.getElementById('wpComment').style.display='none';form.elements[11].focus()"
$(document).ready(function() {
        $('.submitSpam').click(function() {
            document.getElementById('wpComment').style.display='none';
            form.elements[11].focus();
        });
    });