Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • the same issue as above, it will only show the first word it truncates after a space.

    Thread Starter jrtoy

    (@jrtoy)

    be sure to wrap your form in:
    <div id=”asaphide”>

    </div>

    Thread Starter jrtoy

    (@jrtoy)

    Solved:

    <script>
    document.addEventListener( ‘wpcf7mailsent’, function( event ) {
    document.getElementById(‘asaphide’).style.display = ‘none’;
    }, false );
    </script>

    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?

Viewing 4 replies - 1 through 4 (of 4 total)