Results 1 to 2 of 2

Thread: Bug in sidebar-gmap.php

  1. #1
    Thread Starter
    Expired Customer abciweb's Avatar
    Join Date
    Aug 2013
    Location
    France
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Bug in sidebar-gmap.php

    In the line below the code should display an image (noLuck = 'images/gmaps-no-result.gif') if the address is not found. But since a picture is loaded by default it can not be replaced because the "append ()" adds code but does not replace it.

    Code:
    //if status google is good 
    //...
     } else {
                (function($) {
                    $('#map').append('<div style="height:400px;background: url(' + noLuck + ') no-repeat center center;"><p style="padding:50px 0;text-align:center;"><?php echo esc_js( __( 'Sorry, the address could not be found.', APP_TD ) ); ?></p></div>');
                    return false;
                })(jQuery);
              }

    It works as expected if we replace append () with html ()

    Code:
    //if status google is good 
    //...
     } else {
                (function($) {
                    $('#map').html('<div style="height:400px;background: url(' + noLuck + ') no-repeat center center;"><p style="padding:50px 0;text-align:center;"><?php echo esc_js( __( 'Sorry, the address could not be found.', APP_TD ) ); ?></p></div>');
                    return false;
                })(jQuery);
              }

  2. #2
    samcy's Avatar
    Join Date
    Mar 2012
    Location
    Germany
    Posts
    12,100
    Thanks
    121
    Thanked 1,756 Times in 1,442 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    Rolf Hassel (Samcy)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Samcy Sidebar-gmap problem
    By epijunky in forum Report ClassiPress Bugs
    Replies: 6
    Last Post: June 11th, 2013, 03:36 AM
  2. Gmap inside tab instead of widget
    By mediacomnc in forum Vantage General Discussion (Legacy)
    Replies: 7
    Last Post: September 20th, 2012, 03:47 PM
  3. [MOD NEEDED] Gmap in colorbox
    By classtenstrom in forum ClassiPress General Discussion
    Replies: 0
    Last Post: July 7th, 2012, 01:44 PM
  4. Gmap problem with showing
    By lopez85 in forum Report ClassiPress Bugs
    Replies: 5
    Last Post: November 14th, 2011, 02:44 PM
  5. GMAP - problem with map center
    By sowhatdesigns in forum Report ClassiPress Bugs
    Replies: 7
    Last Post: July 1st, 2011, 08:42 PM