I’m using the jQuery Placeholder plugin on my forms, everything works perfectly on the asp.net page; and on my masterpage I have all the correct .ClientID settings so my jQuery Validation is works.
The issue I am having is that to initialise the placeholder script you use:
$('input, textarea').placeholder();
Is there a way for me to get this working on a masterpage, I tried calling
<%=txtFirstName.UniqueID %>.placeholder()
with no luck, is there a way to get this working?
Sorry guys I made a mistake; the placeholder is on a TextBox.
All help is greatly appreciated.
Matt
I can only imagine that yourddlFirstHome.UniqueIDattribute returns a string with the ID of the element you want to add a placeholder to. Something likeFirstHome. So you would need to select it with jQuery…Adding in the ASP.NET placeholder you get…
EDIT Forget the above, you should be able to run the plugin on all inputs and textareas indiscriminately. Presumably in your master page you have a html head tag or you are including it in your template somewhere. Just add…