Tiny input box

This topic contains 4 replies, has 2 voices, and was last updated by dennis91 dennis91 7 years, 9 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #2410
    dennis91
    dennis91
    Participant

    Hello,
    I tried to add the shortcode to the ninja sliding panel which is responsive and I have the same situation as this http://wp-dreams.com/forums/topic/tiny-input-box-cant-click-to-type/

    So I tried to apply the solution but it doesnt work for me everytime.Sometime it works but most of the time the search bar is not clickable. Could you please kindly check it out? Thanks.

    #2413
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    Very nice implementation of the search, I like your site design!
    I think, in your case it would be better to trigger a resize method, when the user clicks on the search icon on the left side of the screen. The new code should look something like:

    jQuery(document).ready(function($){
       var scope = $;
       if (typeof aspjQuery != 'undefined')
           scope = aspjQuery;
       jQuery('#nks-tab-1').on('click', function(){
           scope(window).resize();
       });
    });
    

    I havent tested this snippet, I can only hope it works.

    • This reply was modified 7 years, 9 months ago by Ernest Marcinko Ernest Marcinko. Reason: code fix
    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #2421
    dennis91
    dennis91
    Participant

    Hello,
    Thanks for the support. Unfortunately it doesn’t work but I think the idea is correct. Just that the re-size happen when I close the sidebar. And it become unclickable again when I reopen the sidebar. Do you have any idea to solve it? Thanks.

    #2422
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Oh, indeed. I think the problem is, that the resizing is done before the animation of the sidebar is complete, thus the search thinks the sidebar is 0px wide. So, I think a 1-2 second delay on the resize method would solve this:

    jQuery(document).ready(function($){
       var scope = $;
       if (typeof aspjQuery != 'undefined')
           scope = aspjQuery;
       jQuery('#nks-tab-1').on('click', function(){
            setTimeout(function() {
              scope(window).resize();
            }, 1200);
       });
    });
    
    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #2423
    dennis91
    dennis91
    Participant

    I set it to shorter delay and it works perfectly now! Great thanks for the support. Like your product.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.