Difference between revisions of "List page map overlapping template header"
From JReviews Documentation
Line 3: | Line 3: | ||
To fix the conflict, it is necessary to push down the map by the height of the header. | To fix the conflict, it is necessary to push down the map by the height of the header. | ||
To do that, modify this file: | To do that, modify this file: | ||
− | *<span style="color: blue">/com_jreviews_addons/geomaps/views/ | + | *<span style="color: blue">/components/com_jreviews_addons/geomaps/views/js/geomaps.js</span> |
− | + | ||
− | + | ||
Find this line in the file: | Find this line in the file: | ||
Line 11: | Line 9: | ||
var y = jQuery(window).scrollTop(); | var y = jQuery(window).scrollTop(); | ||
</source> | </source> | ||
− | |||
and add the height of your fixed header like this: | and add the height of your fixed header like this: | ||
Line 18: | Line 15: | ||
</source> | </source> | ||
+ | If you enabled '''Load All Minified''' in JReviews Configuration, you will need to create a minified geomaps-ck.js file as well. | ||
+ | |||
+ | Besides the change in the geomaps.js file, it is necessary to set the height like this in the custom_styles.css file of your JReviews theme: | ||
− | |||
<source lang="css"> | <source lang="css"> | ||
#gm_map_wrapper.fixed { | #gm_map_wrapper.fixed { | ||
Line 25: | Line 24: | ||
} | } | ||
</source> | </source> | ||
− | |||
In these examples, 55 represents the height of the header/menu. | In these examples, 55 represents the height of the header/menu. |
Revision as of 10:35, 15 December 2013
If your Joomla template uses a fixed header/menu, it is possible that the map on JReviews list pages will overlap the header when scrolling the page.
To fix the conflict, it is necessary to push down the map by the height of the header. To do that, modify this file:
- /components/com_jreviews_addons/geomaps/views/js/geomaps.js
Find this line in the file:
var y = jQuery(window).scrollTop();
and add the height of your fixed header like this:
var y = jQuery(window).scrollTop()+55;
If you enabled Load All Minified in JReviews Configuration, you will need to create a minified geomaps-ck.js file as well.
Besides the change in the geomaps.js file, it is necessary to set the height like this in the custom_styles.css file of your JReviews theme:
#gm_map_wrapper.fixed { top: 55px; }
In these examples, 55 represents the height of the header/menu.