Warning: A non-numeric value encountered in /homepages/10/d677520614/htdocs/ryanragle.com/wp-content/themes/Divi/functions.php on line 5560

If you do a lot of web work, chances are you play with both prototype and jquery. Even more, if you’re using the google APIs then it makes it really easy to load up these libraries. Using something like the following:
<script type=‘text/javascript’ src=“http://www.google.com/jsapi”></script>
<script type=‘text/javascript’>
google.load(“jquery”, “1.3.2”);
google.load(“prototype”, “1.6.1.0”);
</script>

Now, as you probably know, to make sure these two play nice together, you need to add something like the following:

var $j = jQuery.noConflict();

The problem is, the following does not work:
<script type=‘text/javascript’ src=“http://www.google.com/jsapi”></script>
<script type=‘text/javascript’>
google.load(“jquery”, “1.3.2”);
var $j = jQuery.noConflict();
google.load(“prototype”, “1.6.1.0”);
</script>

The resolution to this? Separate the noConflict() function with a <script> tag like the following:
<script type=‘text/javascript’ src=“http://www.google.com/jsapi”></script>
<script type=‘text/javascript’>
google.load(“jquery”, “1.3.2”);
</script>
<script type=‘text/javascript’>
var $j = jQuery.noConflict();
</script>
<script type=‘text/javascript’>
google.load(“prototype”, “1.6.1.0”);
</script>

Now you should be well on your way to writing those jQuery / prototype masterpieces.