Javascript issue

I'm trying to call a function from a seperate js file; this works if its on a standalone page, but with other elements in the body of a page, it will not work. i know it has to do with the document.get but not sure how to make it play nice with everything else on the page

(this is simply pulling a twitter feed and displaying it)

<script type="text/javascript">
$(document.get).ready(function () {
	$('#twitter').twitterfeed('facebook', {
		limit: 10
	});
});
</script>

<div id="twitter"></div>

Open in new window

gregjarvisAsked:
Who is Participating?
 
Sar1973Connect With a Mentor Commented:
Another cause could be that you have 2 functions with the same name both in the .js file and in the script declaration of the page.
0
 
Gurvinder Pal SinghCommented:
replace line 2 with
$(document).ready(function () {

and then try
0
 
gregjarvisAuthor Commented:
no luck
0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

 
Sar1973Commented:
I knew that you can call functions included in a separate .js file like this, even including other customized functions:
<script language="JavaScript" src="myJSCode.js">
function myFunction1(){
.....
}
</script>
0
 
gregjarvisAuthor Commented:
hmm still can't get it to work...
0
 
gregjarvisAuthor Commented:
http://www.zazar.net/developers/jquery/ztwitterfeed/

that is the site im taking the code from. for example, that script wont work on the same page as say this one
http://www.zazar.net/developers/jquery/zweatherfeed/
0
 
Sar1973Commented:
Try also changing '#twitter' to something like '#Gregstwitter' in the user name parameter: sometimes you get redundancies without beeing aware of.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.