I would like to add the jQuery OpenID Plug-in in my webpage.
Actually i would like to add it into a content page of a MasterPage
$(function () { $("form.openid:eq(0)").openid(); });
But something goes terribly wrong, and the Javascript code is never executed.
I guess this has to do with the fact that my page renders as follows
<form id="form1" runat="server">
...
</form>
and here comes a part of Javascript called
//jQuery OpenID Plugin 1.1
//Copyright 2009 Jarrett Vance http://jvance.com/pages/jQueryOpenIdPlugin.xhtml
$.fn.openid = function() {
var $this = $(this);
var $usr = $this.find('input[name=openid_username]');
and the Jquery as follows
$(function () { $("form.openid:eq(0)").openid(); });
So what does the line above mean?
Can be broken down to this…
Simply means call the inner function once the page is loaded.
Means call the method
openid()on the first instance of a form with the cssclass openid.