Home › Toolset Professional Support › [Resolved] Hide "my location" icon
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | 9:00 – 12:00 | 9:00 – 12:00 | 9:00 – 12:00 | 9:00 – 12:00 | 9:00 – 12:00 | - |
- | 13:00 – 18:00 | 13:00 – 18:00 | 13:00 – 18:00 | 14:00 – 18:00 | 13:00 – 18:00 | - |
Supporter timezone: America/Jamaica (GMT-05:00)
Tagged: Views plugin
This topic contains 6 replies, has 2 voices.
Last updated by miroslavI 4 years, 1 month ago.
Assisted by: Shane.
Tell us what you are trying to do? Hide icon in filter hidden link
Is there any documentation that you are following? Hide with JS code but when you use filter, icon appear.
Is there a similar example that we can see?
What is the link to your site? hidden link
I successfully hide location icon with this code:
jQuery( document ).ready(function() {
jQuery(".js-toolset-maps-distance-current-location").prop("value", "Nájdi moju lokalitu");
});
But when you click on filter, icon show up :-O
Thanks for help.
Hi Miroslav,
Thank you for getting in touch.
The reason for this is because you need to add your function to the Javascript callback for when the search has been triggered.
jQuery( document ).on( 'js_event_wpv_parametric_search_triggered', function( event, data ) { /** * data.view_unique_id (string) The View unique ID hash * data.form (object) The jQuery object for the View form * data.update_form (bool) Whether the custom search form will be updated * data.update_results (bool) Whether the custom search results will be updated */ });
Add your function within this and it will activate again after the search has been triggered.
Please let me know if this helps to resolve your issue.
Thanks,
Shane
hello, i place your code to the view but it still not working see attached image. thank you for your help
Hi Miroslav,
You will need to add your function within the callback function that i've provided.
Example
jQuery( document ).ready(function() { jQuery(".js-toolset-maps-distance-current-location").prop("value", "Nájdi moju lokalitu"); }); jQuery( document ).on( 'js_event_wpv_parametric_search_triggered', function( event, data ) { /** * data.view_unique_id (string) The View unique ID hash * data.form (object) The jQuery object for the View form * data.update_form (bool) Whether the custom search form will be updated * data.update_results (bool) Whether the custom search results will be updated */ jQuery( document ).ready(function() { jQuery(".js-toolset-maps-distance-current-location").prop("value", "Nájdi moju lokalitu"); }); });
So your final code should look like above.
Thanks,
Shane
Hi, sorry but still not working, see attached image.
Hi Miroslav,
Let us use the filter that will fire after you've submitted the form.
jQuery( document ).ready(function() { jQuery(".js-toolset-maps-distance-current-location").prop("value", "Nájdi moju lokalitu"); }); jQuery( document ).on( 'js_event_wpv_parametric_search_results_updated', function( event, data ) { /** * data.view_unique_id (string) The View unique ID hash * data.layout (object) The jQuery object for the View layout wrapper */ jQuery(".js-toolset-maps-distance-current-location").prop("value", "Nájdi moju lokalitu"); });
This should cause it to work now.
My issue is resolved now. Thank you!