ASP.NET Cafe
new tricks every week

Remove links outline in IE 7 and IE 6 with JQuery

Monday, 26 July 2010 10:55 by dmitriy

IE 7 doesn't respect css property outline so you can't remove annoying outline using following css:

* :focus { outline: none; }

But you can remove it using JQuery . Most of sites already have Jquery include so you don't need to add anything except following code.

$("a").each(function() {
  $(this).attr("hideFocus", "true").css("outline", "none");
});

If you're using Mootools or Prototype - you can rewrite this code for these frameworks easily.

And this won't affect your css validation!

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:   ,
Categories:   ASP.NET | CSS
Actions: E-mail | del.icio.us | Kick it! | DZone it! | Permalink | Comments (0) | Comment RSSRSS comment feed

MVC: authorization action filters

Sunday, 25 July 2010 09:47 by dmitriy

How to protect some controller action(s) from being accessed by unauthorized users?

Usually you can check this.User.Identity.IsAuthenticated in each action. But that doesn't look good, does it?

What if we can have an attribute to mark actions accessible only by logged in users?

More...

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:  
Categories:   ASP.NET | MVC
Actions: E-mail | del.icio.us | Kick it! | DZone it! | Permalink | Comments (0) | Comment RSSRSS comment feed