Forum Replies Created
-
AuthorPosts
-
There was literally an extra DIV tag closing and it broke everything in IE8. all is good!!
ahh. Totally forgot about appending functions.php, So I set up something simple but it’s getting an Ajax error any idea why?
add_action(‘mappress_map_display’, ‘hide_some_maps’);
function hide_some_maps() {
?><script type=”text/javascript”>
( function( $ ){
alert(‘test’);
} )( jQuery )
</script>
<?php
}
There’s also an action that gets called when a map is displayed: mappress_map_display($map). It gets passed the entire map in ($map). You might be able to output your script tags there as well.
How do I access that exactly? (not entirely understanding that bit would love to try it)
The reason I put it in map_poi_list was because I was unable to get the script to fire anywhere else, inline in the footer, in external js files, anywhere. once the map list is built I can’t manipulate any of it externally…
<script type=”text/javascript”>
$( “.mapLinks li” ).each(function(index) {
$(‘.lazyLoad’).hide();
if (index >= 20) {
$(this).hide();
$(‘.lazyLoad’).show();
}
});
</script>
I just want to hide the rest of the list since we have like 200 items and then put a button on the bottom to show the rest.
Bleh, it’s private. However I found the cause. I have javascript in map_poi_list.php (sorry forgot I appended it). It works on all browsers but IE8.
however removing the code and leaving the <script> tag still breaks it. Just having <script type=”text/javascript”></script> in there is breaking the IE8 list… any possible solution to this? I can just do feature jquery detection to hide the script from IE, but if the script is removed and it still doesn’t work not sure what to do.
😀 awesome thanks again for the swift support.
Thanks for the update. I have been using the editor and will check back for the updated code!
-Kevin
-
AuthorPosts
