New home › Forums › Pro Add-on › How to move the marker list pagination inside the market list div
- This topic has 5 replies, 2 voices, and was last updated 1 month, 4 weeks ago by AbelC.
-
AuthorPosts
-
November 27, 2020 at 2:42 am #61608matthieu3960Participant
Hi,
Thank you for your help on my previous requests !
Now I need to move the marker list pagination inside the market list div.I managed doing it by adding some code to the jQuery(window).on(“load” in core.js
but pagination goes back to its initial place when i click on the pager.Thanks a lot for your help !
Here is my half functioning hack :
jQuery(window).on("load", function() { var $ = jQuery; $("[id^='wpgmza_input_from_'], [id^='wpgmza_input_to_']").each(function(index, el) { if(!WPGMZA.UseMyLocationButton) return; var button = new WPGMZA.UseMyLocationButton(el); $(el).after(button.element); }); var closebutton = "<div class=\'closebtn\'>×</div>"; var openbutton = "<div class=\'openbtn\'>≡</div>"; var pagination = $('.wpgmza-pagination'); $('.wpgmza_marker_list_class').prepend(closebutton); $('.wpgmza_marker_list_class').append(pagination); $('.wpgmza_marker_list_class').before(openbutton); $(".closebtn").click(function() { $('.wpgmza_marker_list_class').removeClass("opennav"); }); $(".openbtn").click(function() { $('.wpgmza_marker_list_class').addClass("opennav"); }); });
Attachments:
You must be logged in to view attached files.November 27, 2020 at 7:29 am #61614AbelCModeratorHi There,
Thank you so much for getting back to us.
Could I kindly ask if you could please provide me with a link to your map page as this will allow me to take a closer look and advise further?
Would it also perhaps be possible to please provide us with a screenshot of what you would like to achieve to [email protected]
This will be a tremendous help!
Please note that we do not recommend making changes to the core files as all changes will be lost when updating the plugin. With that said, you will be able to add the Custom JS code in Maps -> Settings -> Advanced -> Custom JS.
I look forward to hearing back from you and resolving this issue.
Kind Regards,
AbelNovember 27, 2020 at 9:55 am #61624matthieu3960ParticipantHi Abel,
Thanks so much for your time,
Really hope I can find a better implementation for my code.
I just sent you some screenshoots + linkKind regards,
MatthieuNovember 27, 2020 at 11:11 am #61636AbelCModeratorHi There,
Thank you so much.
I have now responded to your email. Please do let me know if you have not received my response.
I look forward to hearing back from you.
Kind Regards,
AbelNovember 27, 2020 at 11:35 am #61646matthieu3960ParticipantThank you so much for the support, you made my day
I will copy the lifesaving piece of code here, in case it’s useful to someone
jQuery(function($){
jQuery(document).on(‘markerlistingupdated.wpgmza’, function(){
$(‘.paginationjs’).insertAfter(‘.wpgmaps_blist_row:last’);
});
});All the best,
MatthieuNovember 27, 2020 at 2:01 pm #61652AbelCModeratorHi Matthieu,
Thank you for letting me know, and it is only a pleasure.
Please do let me know if there is ever anything else that I can assist you with?
If you ever have two minutes spare, please consider reviewing the plugin on https://wordpress.org/support/plugin/wp-google-maps/reviews/#new-post it would mean the world to me! (If possible, could I ask you to mention both your name and mine (Abel) in the review for administrative purposes.)
This would be a tremendous help and have a great day!
Kind Regards,
Abel -
AuthorPosts
- You must be logged in to reply to this topic.