I've set up a simple hide-show.js
file for my website and I'm working on a module as well.
Problem is, if my module is active, the jQuery for the page doesn't work, is there something I need to do to 'close' my module after writing or anything?
Edit: My console does not show any errors. And with jQuery I mean the functions on the page (i.e. clicking on a hide-show button does nothing).
<?php function maps_markers_init() {
if (!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest'){
} else {
$latitudes = db_query('SELECT field_latitude_value FROM {field_data_field_latitude}')->fetchCol();
$longitudes = db_query('SELECT field_longitude_value FROM {field_data_field_longitude}')->fetchCol();
json_encode($latitudes);
json_encode($longitudes);
require(drupal_get_path('module', 'maps_markers') . '/maps_API.php');
};};?>
maps_API.php
contents:
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=[api key]"></script>
Also, hide-show.js contents:
$ = jQuery.noConflict();
($(function(){
$(".collapse_btn_down").click(function(){
$(".mid_div").fadeToggle( "800" );
$('.buurtkiezer').toggleClass('buurtkiezer_solo');
$('.content_wrap').toggleClass('content_wrap_solo');
$(this).toggleClass('collapse_btn_up');
$(".legenda").css("margin-right","20px");
$(".legenda").css("margin-top","-80px");
});
}));