Getting an error when i use the following script to show a div when the page is loaded.
<script type="text/javascript">
$(document).ready(function() {
开发者_运维问答 $("#friendslist").Show();
});
</script>
It says $("#friendslist").Show()
is not a function
You want
$("#friendslist").show()
instead of
$("#friendslist").Show()
(note, lower case 's' in 'show')
jQuery tends to use camelCase for it's function names (per accepted JavaScript best practices). As such, the first word of the function name would be lowercase with each subsequent word being Title case.
$("#friendslist").show();
will be what you're looking for. An example of a camelCase function would be:
$("#friendslist").setStyle("display: block;");
Which is probably what .show() is doing anyway.
精彩评论