Archive | jQuery

05 July 2010 ~ 0 Comments

MarkItUp: Rails plugin that turns any textarea into a markup editor

I recently published a plugin that helps you turn any textarea into a markup editor. It is based on excellent markItUp! jQuery plugin. Example The most simple usage with preset defaults <html> <head> <%= javascript_include_tag “path/to/jquery” %> <%= mark_it_up ‘#miu_test’ %> </head> <body> <% form_tag do %> <%= text_area_tag “miu_test” %> <% end %> </body> [...]

Continue Reading

17 January 2008 ~ 7 Comments

Set focus on first field with jQuery

f you are using Prototype see this post. Setting focus on the first text field with jQuery is as simple as $(“input:text:first”).focus(); $(“input:text:visible:first”).focus(); Find more at http://docs.jquery.com/Selectors Update: If you are on Rails use auto_focusable_forms, dependency free plugin that will focus first input for you.

Continue Reading

08 December 2007 ~ 3 Comments

Blur links with jQuery

While surfing the Web, you probably noticed the dotted outline, that appears when you click on the link. If your link doesn’t lead to another page, but instead triggers some event in the same page, outline stays there and looks ugly. For modern browsers you can remove it with simple css: a:focus, a:active { outline:none; [...]

Continue Reading