Search form close button

GK User
Thu Mar 31, 2016 5:07 pm
My client says that it is not obvious for the user that he has to press again the magnifier icon on top for the search form to close.

How can I add a close button? Can you please give me a hint?

Thanks in advance

Depika
User avatar
Expert Boarder

teitbite
Mon Apr 04, 2016 11:22 am
Hi

Try edit: /html/mod_search/default.php and add this line after <form> start.

Code: Select all
<img class="search-close" src="path_to_image_with_x" />


than add this code to /layout/block/head.php

Code: Select all
<script type="text/javascript">(function($) {$(document).ready(function() {
$('.search-close').click(function(){
$('#gkSearch').removeClass('active');
});
});})(jQuery)</script>
User avatar
Moderator

GK User
Mon Apr 04, 2016 2:32 pm
Thank you so much. It worked like a charm.

the only difference is that I needed to add the image at file default.php under folder
html/mod_virtuemart_search
User avatar
Expert Boarder

teitbite
Sat Apr 09, 2016 4:37 pm
depika wrote:Thank you so much. It worked like a charm.

the only difference is that I needed to add the image at file default.php under folder
html/mod_virtuemart_search


I'm sorry, but I do not understand. Can You please explain what You need a little better ?
User avatar
Moderator

GK User
Mon Apr 11, 2016 12:49 pm
depika wrote:Thank you so much. It worked like a charm.

the only difference is that I needed to add the image at file default.php under folder
html/mod_virtuemart_search



You changes were correct. This is what I wanted. But I had to apply them at module virtuemart search not joomla search.
User avatar
Expert Boarder

teitbite
Wed Apr 13, 2016 2:34 pm
Hi

Ok. Now I understand :) Closing thread now.
User avatar
Moderator


cron