How to move the marker list pagination inside the market list div

New home Forums Pro Add-on How to move the marker list pagination inside the market list div

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #61608
    matthieu3960
    Participant

    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\'>&times;</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.
    #61614
    AbelC
    Moderator

    Hi 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,
    Abel

    #61624
    matthieu3960
    Participant

    Hi Abel,

    Thanks so much for your time,
    Really hope I can find a better implementation for my code.
    I just sent you some screenshoots + link

    Kind regards,
    Matthieu

    #61636
    AbelC
    Moderator

    Hi 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,
    Abel

    #61646
    matthieu3960
    Participant

    Thank 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,
    Matthieu

    #61652
    AbelC
    Moderator

    Hi 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

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.