4

I need to implement jquery tooltip in Asp.net MVC3-Razor view. Can anybody give some tips & samples to carry out this operation

Thanks, Selva

2 Answers 2

5

If you just want simple text to be shown in your tooltip, i found this to be the best solution -

:)

If you want to apply for different controls, do something like this -

@Html.TextBoxFor(model=>model.FieldName, new {title="Your Tooltip text goes here"})

works for everything except EditorFor. Enjoy.

Sign up to request clarification or add additional context in comments.

Comments

1

Personally, I prefer the tooltip plugins that:

  • Reuse a single container (vs. wrapping target elements in a bunch of curfty markup)
  • Allow for tip content to be declared on the target element itself (via "data-" attributes)
  • Allow full styling via css classes (on / off states, etc controlled by adding css classes as opposed to injecting inline style rules)

There are literally tons of options out there... when I last checked, this one was my personal preference:

http://code.drewwilson.com/entry/tiptip-jquery-plugin

But there are many more... including one native to jQuery UI coming soon!

http://blog.jqueryui.com/2010/05/jquery-ui-19m1-tooltip/

1 Comment

hi, Thanks for ur answer...i need to how to implement the same in Razor engine(Asp.net Mvc3), can u help in that

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.