i have a page on which i have google maps api in bottom div and jQuery easytbs for showing search bars with div. but i can call them both at once. easytabs stops working each time i call them separately they work fine. the message i receive is $ is undefined or c is undefined etc.
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?key=mykey&sensor=false"></script>
<script type="text/javascript">
var map;
var geocoder;
var marker1 = null, marker2 = null;
$(document).ready(function () {
function initialize() {
geocoder = new google.maps.Geocoder();
var mapProp = {
center: new google.maps.LatLng(40, -10),
zoom: 3,
mapTypeControl: false,
panControl: false,
zoomControl: false,
streetViewControl: false,
scrollwheel: false,
mapTypeId: google.maps.MapTypeId.MAP
};
map = new google.maps.Map(document.getElementById("map-canvas"), mapProp);
}
google.maps.event.addDomListener(window, 'load', initialize);
});
$(document).ready(function () {
$('#tab-container').easytabs();
});
$(document).ready(function () {
$('.show_hide').click(function () {
$(this).next('.slidingDiv').slideToggle();
return false;
});
});
</script>
<script type="text/javascript" src="../js/jquery.easytabs.min.js"></script>
any pointer on how both can co-exists will be great. thanks
FYI: i am using twitter bootstrap
Maybe you can stack your script this way:
Note:
$ is undefined
because jQuery lib is not referenced in the head and should be top most as suggested in the answer.