jrtoy
Forum Replies Created
-
Forum: Plugins
In reply to: [Address autocomplete Contact Form 7] Placeholder textthe same issue as above, it will only show the first word it truncates after a space.
Forum: Plugins
In reply to: [Contact Form 7] Hide form using DOM Eventsbe sure to wrap your form in:
<div id=”asaphide”></div>
Forum: Plugins
In reply to: [Contact Form 7] Hide form using DOM EventsSolved:
<script>
document.addEventListener( ‘wpcf7mailsent’, function( event ) {
document.getElementById(‘asaphide’).style.display = ‘none’;
}, false );
</script>Forum: Fixing WordPress
In reply to: Add Javascript to Nav Menu?Glad I found you guys here… OK here’s my issue that you may be able to fix very quickly. I’m using events calendar plugin by tri.be. Created a script:
<script type="text/javascript"> function showLocation(position) { window.location.href ="https://www.wcsaddict.com/events/?action=tribe_list&tribe_paged=1&tribe-bar-geoloc-lat="+ position.coords.latitude +"&tribe-bar-geoloc-lng="+ position.coords.longitude; } function errorHandler(err) { if(err.code == 1) { alert("Error: Access is denied!"); }else if( err.code == 2) { alert("Error: Position is unavailable!"); } } function getLocation(){ if(navigator.geolocation){ // timeout at 60000 milliseconds (60 seconds) var options = {timeout:60000}; navigator.geolocation.getCurrentPosition(showLocation, errorHandler, options); }else{ alert("Sorry, browser does not support geolocation!"); } } </script>
it grabs a users location and places it in the url to display events nearby. I created the menu area going to # (nowhere) and know the menu id, I don’t know how to make it all work, I tested the script by adding getLocation() at the end and it all worked great. How do I make my menu when I click “nearby” load this script?