Commit 0edbd4efccbbaa53121ef0db224caea0947a6199
1 parent
114db4fb
tokar commit
Showing
3 changed files
with
29 additions
and
2 deletions
Show diff stats
frontend/views/layouts/main.php
frontend/web/css/style.css
... | ... | @@ -4979,9 +4979,10 @@ input.custom-check:checked + label span, input.custom-check:checked + label:hove |
4979 | 4979 | border-bottom: 1px solid #b7b7b7; |
4980 | 4980 | display: none; |
4981 | 4981 | } |
4982 | +.search-list ul.active {display: block} | |
4982 | 4983 | .search-list li { |
4983 | 4984 | list-style: none; |
4984 | - padding: 0 20px 0 10px; | |
4985 | + padding: 0 0 0 10px; | |
4985 | 4986 | border-top: 1px solid #b7b7b7; |
4986 | 4987 | height: 20px; |
4987 | 4988 | line-height: 20px; |
... | ... | @@ -4989,6 +4990,8 @@ input.custom-check:checked + label span, input.custom-check:checked + label:hove |
4989 | 4990 | font-size: 13px; |
4990 | 4991 | color: #b7b7b7; |
4991 | 4992 | cursor: pointer; |
4993 | + width: 118px; | |
4994 | + box-sizing: border-box; | |
4992 | 4995 | } |
4993 | 4996 | .search-list li:hover { |
4994 | 4997 | transition: 0.2s; | ... | ... |
frontend/web/js/script.js
... | ... | @@ -826,4 +826,28 @@ $(document).ready(function(){ |
826 | 826 | } |
827 | 827 | |
828 | 828 | |
829 | + | |
830 | + $('.search-list span').click(function(){ | |
831 | + if($('.search-ul').hasClass('active')) { | |
832 | + $('.search-list ul').removeClass('active'); | |
833 | + $('.search-main-menu form input').focus() | |
834 | + } else { | |
835 | + $('.search-list ul').addClass('active'); | |
836 | + | |
837 | + } | |
838 | + $('.search-list ul.active li').click(function(){ | |
839 | + $('.search-list ul').removeClass('active'); | |
840 | + $('.search-list span').html($(this).text()) | |
841 | + var searchListIndex = $(this).index() | |
842 | + searchListIndex = searchListIndex+1 | |
843 | + $('.search-main-menu form input[type="hidden"]').val(searchListIndex) | |
844 | + $('.search-main-menu form input').focus() | |
845 | + }) | |
846 | + | |
847 | + | |
848 | + | |
849 | + }) | |
850 | + | |
851 | + | |
852 | + | |
829 | 853 | }); |
830 | 854 | \ No newline at end of file | ... | ... |