Forums › Forums › Search & Filter Pro › UIKit Style is not loading after submit on Yootheme Pro
Tagged: search and filter, Yootheme Pro
- This topic has 11 replies, 2 voices, and was last updated 4 years, 7 months ago by Anonymous.
-
Anonymous(Private) April 24, 2020 at 1:24 am #241191
Hello,
I have installed Search and Filter and it works great with Yootheme Pro site builder, we manage to style it using UIKit https://getuikit.com/docs/form as Yootheme Pro based on UIKit front-end framework.
But the issue is when we submit the form the style disappears, check here to check-in action [link redacted] you need to select the filter and click on the button to see what I mean.
I had a chat with Yootheme team and here is what they told me. https://a.cl.ly/E0ubzAZe
Kindly help me fix this issue.
Best regards,
HadiTrevor(Private) April 24, 2020 at 11:56 am #241239Let us assume that there is a function loaded by the UI Kit on document ready using JavaScript/jQuery. The style it adds would be removed by an Ajax refresh of the results section of the page, so the UI Kit function would need to be loaded again after our Ajax has finished. We have a trigger you can use to do this, but where I have shown a comment in the code snippet, you will need the author of UI Kit to help you replace that line with their code:
<script>(function ( $ ) { "use strict"; $(document).on("sf:ajaxfinish", ".searchandfilter", function(){ // call your script or function here }); }(jQuery));</script>
Anonymous(Private) April 24, 2020 at 2:21 pm #241277Thank you, Trevor, that we did is this:
SCRIPTjQuery(document).ready(function () { jQuery('.sf-input-select').addClass('uk-select uk-form-width-medium uk-form-large'); jQuery('.sf-input-text').addClass('uk-input uk-form-width-medium uk-form-large'); jQuery('.search-filter-reset').addClass('uk-button uk-button-danger uk-button-large'); })
CSS
.searchandfilter ul li {displa:inline!important;} .searchandfilter ul li { display:inline!important; } .sf-input-text, .sf-input-select, .search-filter-reset { margin: 10px; }
I tried what you told me but didn’t work, assume I am missing something.
Trevor(Private) April 24, 2020 at 2:31 pm #241281So, your new, additional script to add to the page would be:
<script>(function ( $ ) { "use strict"; $(document).on("sf:ajaxfinish", ".searchandfilter", function(){ jQuery('.sf-input-select').addClass('uk-select uk-form-width-medium uk-form-large'); jQuery('.sf-input-text').addClass('uk-input uk-form-width-medium uk-form-large'); jQuery('.search-filter-reset').addClass('uk-button uk-button-danger uk-button-large'); }); }(jQuery));</script>
Is that what you did?
-
AuthorPosts