Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $('body').delegate('a.skiplink-accessible-text', 'click', function (e) {
- //e.preventDefault();
- if (!$.browser.msie) {
- e.preventDefault();
- }
- var jumpTo = $(this).attr('href');
- $('body').find(jumpTo).attr('tabindex', - 1).focus();
- });
- preventDefault: function() {
- this.isDefaultPrevented = returnTrue;
- var e = this.originalEvent;
- if ( !e ) {
- return;
- }
- // if preventDefault exists run it on the original event
- if ( e.preventDefault ) {
- e.preventDefault();
- // otherwise set the returnValue property of the original event to false (IE)
- } else {
- e.returnValue = false;
- }
- },
- $(document).ready(function(){
- $('a').on('click', function(e){
- e.preventDefault();
- var jumpTo = $(this).attr('href');
- $(jumpTo).attr('tabindex', '-1').focus();
- });
- });
- $('body').delegate('a', 'click', function(e){ // ...
- });
- $('body').delegate('a.skiplink-accessible-text', 'click', function (e) {
- if (!$.browser.msie) {
- e.preventDefault();
- } else {
- e.returnValue = false;
- }
- var jumpTo = $(this).attr('href');
- $('body').find(jumpTo).attr('tabindex', - 1).focus();
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement