Перейти к содержимому


Фотография
- - - - -

Autocomplete


Лучший Ответ Kess , 02 October 2013 - 05:57

Try to change your CSS modifications to this

.tm-noblog #ui-id-1.ui-autocomplete {
    top: 78px !important;
}

.tm-noblog #ui-id-1.ui-autocomplete.fx {
    position: fixed;
    top: 49px !important;
}

Also I removed frontpage support because we'll hopefully remove sticky from there.

 

I've noticed that the <body> has .tm-noblog class on all pages except frontpage. Let's use it to disable sticky header there:

if (_rys(this).scrollTop() > 120) {  
    _rys('.tm-noblog #fixedheader').addClass("headerbar");
    _rys('.tm-noblog #ui-id-1').addClass("fx");
} else {  
    _rys('.tm-noblog #fixedheader').removeClass("headerbar");
    _rys('.tm-noblog #ui-id-1').removeClass("fx");
}
Перейти к сообщению


  • Закрытая тема Тема закрыта
Сообщений в теме: 13

#11 Kess

Kess

Отправлено 02 October 2013 - 18:44

Hello,

 

If you want to have several search bars on one page then yes, you'll have to use something unique to address them. They don't have unique parent divs so In this example I used an "id". In order to add this functionality to your frontpage form, I think it would be enough to modify this script by adding another selector:

<script type="text/javascript">
jQuery(document).ready(function() {
    jQuery('#ui-id-1 li').live("click", function() {
        jQuery('#jbzoo-filter-search2-95, #jbzoo-filter-search1-99').submit();
    });
});
</script>

For your future search modules, you can get the needed id by looking at the "form" element of that module:

ub5_200x0.png

 

Also, it's better to check an id of autocomplete list to be sure. It is generated as you type, so if you type something in the search field, having an opened inspector, you'll see it at the bottom:

vbr_200x0.png

 

 

Regarding your second issue, I'm afraid it can't be done with a simple script like this one.


  • 1

#12 P.K

P.K

Отправлено 11 October 2013 - 13:19

Hi

Thanks that solves the problem. 

Though there is a slight problem of css which arrived suddenly. Its the misaligned search button

p3iy.jpg

 

Tried a lot to correct it.Cant find the problem

 

thanks


  • 0

#13 Sliapy

Sliapy

Отправлено 11 October 2013 - 14:06

Can you provide a link to the page with this field?


Сообщение отредактировал Sliapy: 11 October 2013 - 14:07

  • 0
[color=#aa0000]Не забывайте нажимать кнопку "Вопрос Решён" под сообщением, которое решило Вашу проблему.[/color]

#14 Kess

Kess

Отправлено 11 October 2013 - 14:11

Try this:

To your existing style:

#jbzoo-filter-search1-99 .filter-fields, #jbzoo-filter-search1-99 .controls {
    display: inline-block;
}

add

vertical-align: middle;

and add another style:

#jbzoo-filter-search1-99 .controls {
    margin-top: 5px;
}

This seems to work fine.


  • 0




Click to return to top of page in style!