Лучший Ответ Kess , 08 July 2014 - 20:51
I didn't notice that there is a div with the same class at the bottom. But, thankfully, the first one can be specified using additional classes which the second one doesn't have.
Did the width of those inputs changed after adding that code? If so, let's try to make it a bit different.
Here is an updated code:
jQuery(document).ready(function() { jQuery(".tm-wrapper .tm-block.tm-block-padding-top-bottom.tm-block-secondary > .uk-container").before( "<div class='togglesearch'><span>Search</span></div>" ); jQuery(".togglesearch").next().hide(); jQuery(".togglesearch").click(function(){ jQuery(this).next().slideToggle(500); }); });
and CSS is changed too (removed "display: none" which could have caused shrinking) :
.togglesearch { text-align: center; } .togglesearch span { cursor: pointer; }
If this fails to fix the width, you can overwrite any inline styles created by JS using !important in your CSS rules.
Перейти к сообщению