-
AuthorPosts
-
July 4, 2017 at 7:26 pm #1046082
Hi, I’d like to change the fancy search feature in the ‘head search’ to a normal search box and button, so the menu doesn’t disappear etc, how can I do that?
Pankaj Sharma ModeratorPankaj Sharma
- Join date:
- February 2015
- Posts:
- 24589
- Downloads:
- 144
- Uploads:
- 202
- Thanks:
- 127
- Thanked:
- 4196 times in 4019 posts
July 5, 2017 at 2:36 am #1046171Hi
Open template folder /js/script.js file
find and remove// Head Search // -------------- (function($){ $(document).ready(function(){ if($('.logo').outerWidth() < $('#t3-header .container').outerWidth()) { var searchWidth = $('#t3-header .container').outerWidth() - $('.head-right').outerWidth() - $('.logo').outerWidth(); $('.head-search-wrap').css('width',searchWidth); } else { var searchWidth = $('#t3-header .container').outerWidth() - $('.head-right').outerWidth(); $('.head-search-wrap').css('width',searchWidth); } $(window).resize(function(){ if($('.logo').outerWidth() < $('#t3-header .container').outerWidth()) { var searchWidth = $('#t3-header .container').outerWidth() - $('.head-right').outerWidth() - $('.logo').outerWidth(); $('.head-search-wrap').css('width',searchWidth); } else { var searchWidth = $('#t3-header .container').outerWidth() - $('.head-right').outerWidth(); $('.head-search-wrap').css('width',searchWidth); } }); $('.btn-search').click(function() { $('.head-search').toggleClass('btn-open'); $('.head-search-wrap').toggleClass('btn-open'); $('.head-right').toggleClass('btn-open'); if ($('.head-search-wrap').hasClass('btn-open')) { $('#mod-search-searchword').focus(); } }); $('.t3-navbar .t3-megamenu ul li>a').click(function(e){ if ($(this).hasClass('dropdown-toggle')) { window.location.href = $(this).attr('href'); } }); }); })(jQuery);
now open header.php
find<!-- HEAD SEARCH --> <div class="head-search <?php $this->_c('head-search') ?>"> <button type="button" class="btn btn-search"> <i class="fa fa-search"></i> <i class="fa fa-close"></i> </button> </div> <!-- //HEAD SEARCH -->
replace it with
<!-- HEAD SEARCH --> <div class="head-search <?php $this->_c('head-search') ?>"> <jdoc:include type="modules" name="<?php $this->_p('head-search') ?>" style="raw" /> </div> <!-- //HEAD SEARCH -->
save and check, you will get the default search module.
Regards
July 5, 2017 at 3:36 pm #1046346That’s great – thank you. One further question, is it possible to move the last 2 menu items ‘Søg’ and ‘Forhandler’ to the right side of the naviagtion bar, so they appear to be separated from the other menu items?
Regards
RobPankaj Sharma ModeratorPankaj Sharma
- Join date:
- February 2015
- Posts:
- 24589
- Downloads:
- 144
- Uploads:
- 202
- Thanks:
- 127
- Thanked:
- 4196 times in 4019 posts
July 6, 2017 at 12:33 am #1046393Hi
Please open a new thread for different topic questions. It also helps our community.Regards
-
AuthorPosts
This topic contains 3 replies, has 2 voices, and was last updated by Pankaj Sharma 7 years, 4 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum