I've been doing lots of reading about all the nifty things that can be done using jQuery on a SharePoint site. I decided it was time to dive in! Unfortunately, I seem to have hit my first stumbling block right out of the gate. Following a couple blog posts, I'm trying to add the reference to the master page. I added:
<script language="javascript" src="jquery-1.3.1.min.js" type="text/javascript"></script>
to the <head>
section of the master page. The .js file is in the root directory of the site. I'm trying to run a test to see if it's being included with the following code:
<asp:Content id="Content1" runat="server" contentplaceholderid="PlaceHolderMain">
<script type="text/javascript">
$(document).ready(function() {
$("#cb").live('click', function() {
$("#lblMessage").text("you clicked on CheckBox, selected = " + $("#cb").attr('checked'));
});
});
</script>
<input type="checkbox" id="cb" />
<label id="lblMessage"></label>
</asp:Content>
When I load the page I get an Object Expected Error at the point where the first $
is.
What am I missing here?