Skip to content
/ fyi Public

A simple prototype javascript tooltip that appears when fields have focus

License

Notifications You must be signed in to change notification settings

omenking/fyi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fyi

Fyi is a simple prototype-based javascript plugin to show tooltips when a text_field has focus

Requires

Prototype
Lowpro

Installation and Usage

Download Plugin

./script/plugin install git://github.com/omenking/fyi.git

Add Javascript and Stylesheets

Go get em and place them in your public/javascripts

Prototype
Lowpro

Add into your layout head

<%= javascript_include_tag ‘prototype’, ‘lowpro’, ‘fyi’ >
<
= stylesheet_link_tag ‘fyi.css’ %>

Add the tooltip function below in your text_field and give it the name of the id with the html

<%= f.password_field :login >
<
= tooltip ‘user_login’, ‘Type a short username all lowercase and use spaces for underscores’ %>

Digest It

tooltip(name,html,options={})

  • name – id of the tooltip (needs to be the id name of the text_field)
  • html – the html you want to pass

Sass and Sprockets

If you have Sass or Sprockets installed it’ll copy them to their respected default directories.
Sass and Sprockets rule!

Remember to add to your app/javascripts/application.js

//= require

Remember to add to your application.sass

@import fyi.sass

Copyright © 2009 Andrew Brown, released under the MIT license

About

A simple prototype javascript tooltip that appears when fields have focus

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages