diff --git a/assets/js/opalestate.js b/assets/js/opalestate.js index 65444889..c2ca71f3 100755 --- a/assets/js/opalestate.js +++ b/assets/js/opalestate.js @@ -300,15 +300,14 @@ jQuery( document ).ready( function ( $ ) { /** * Click to show body popup */ - $( 'body' ).delegate( '.opalestate-popup .popup-head', 'click', function () { - var $this = $( this ).parent( '.opalestate-popup' ); - $( '.popup-head', $this ).click( function () { - $( '.opalestate-popup.active' ).removeClass( 'active' ); - $this.toggleClass( 'active' ); - } ); - $( '.popup-close', $this ).click( function () { - $( '.opalestate-popup' ).removeClass( 'active' ); - } ); + $( '.popup-head' ).on( 'click', function ( e ) { + var $popup = $( this ).closest( '.opalestate-popup' ); + $popup.toggleClass( 'active' ); + } ); + + $( '.popup-close' ).on( 'click', function ( e ) { + var $popup = $( this ).closest( '.opalestate-popup' ); + $popup.removeClass( 'active' ); } ); /** diff --git a/templates/search-box/fields/search-city-text.php b/templates/search-box/fields/search-city-text.php index 0b6f88bb..7ead2f52 100755 --- a/templates/search-box/fields/search-city-text.php +++ b/templates/search-box/fields/search-city-text.php @@ -36,10 +36,10 @@ $data_deposit = [