Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New to the CF scene
    Join Date
    Aug 2013
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Navigation Search Button change

    Hi all,

    I am looking to see if any of you can provide a little support with making a small change to the behaviour of a search button/box that I am currently modifying.

    Basically its on a website powered by WP and on the very top navigation there is a search function that it controlled by JavaScript. By default this search function is set to be closed and when the mouse hovers over the search icon it opens up to display a search box and you can search the site. (see images)

    [IMG][/IMG]

    [IMG][/IMG]

    Ideally I would like to just have the search bar/button/function open all the time and not have it open or close. I have already tried to change the code but JavaScript is not really my forte and so I am here asking for some support. The changes I have made so far have meant that I can keep the search open open after a mouse hover but thats only about 50% of what I am trying to achieve.

    The code for the search function is here:

    //tools bar search
    if ( $.trim( $('.gbtr_tools_search_inputtext').val() ) ) {
    $('.gbtr_tools_search_inputtext').show();
    }
    $('.gbtr_tools_search').mouseenter(function(){
    //$('.gbtr_tools_search_inputtext').show(200);
    $('.gbtr_tools_search_inputtext').animate({width: "show"}, 150);
    }).mouseleave(function(){
    if ( !$.trim( $('.gbtr_tools_search_inputtext').val() ) && ( !$('.gbtr_tools_search_inputtext').is(":focus") ) ) {
    $('.gbtr_tools_search_inputtext').show(200);
    }
    });
    $('.gbtr_tools_search_inputtext').blur(function() {
    if ( !$.trim( $('.gbtr_tools_search_inputtext').val() ) ) {
    $(this).show(200);
    }
    });


    That is the code as it stands right now...before the two red 'show' elements were 'hide'. Any support is greatly welcome!

  • #2
    New to the CF scene
    Join Date
    Aug 2013
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    111 views and not even 1 reply...

  • #3
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,075
    Thanks
    0
    Thanked 256 Times in 252 Posts
    Remove that block of code and there must be a css somewhere (inline or external) that hides (display:none) the textbox by default. Remove that too.

    Btw, you have to be patient. You don't pay to get help here.
    Glenn
    ____________________________________

    My Blog
    Tower of Hanoi Android app (FREE!)
    Tower of Hanoi Leaderboard
    Samegame Facebook App
    vBulletin Plugins
    ____________________________________

  • #4
    Senior Coder
    Join Date
    Jan 2011
    Location
    Missouri
    Posts
    4,462
    Thanks
    23
    Thanked 634 Times in 633 Posts
    I was one of those 111 viewers. I saw
    Basically its on a website powered by WP
    and went on my way. WP does things their own way. I don't use it or program for it so I leave it alone. If this don't bring help soon you could try the wordpress support forums http://wordpress.org/support/.

    Good luck
    Evolution - The non-random survival of random variants.

    "If you leave hydrogen alone, for long enough, it begins to think about itself."

  • #5
    New to the CF scene
    Join Date
    Aug 2013
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Glenn,

    I thank you for your comment...and yes patience...I know...its just that when I logged in to see if anyone had posted a reply I first saw the '111' views and I was like..."eureka" someone has an answer....then there were no replies lol.....high to low in seconds.

    Yeah I know forums like this are free and please know that any support I get is most certainly most appreciated 100%

    I am registered on a few forums that are associated with WordPress and chip in my two cents when I can so I understand...

  • #6
    New to the CF scene
    Join Date
    Aug 2013
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by glenngv View Post
    Remove that block of code and there must be a css somewhere (inline or external) that hides (display:none) the textbox by default. Remove that too.

    Btw, you have to be patient. You don't pay to get help here.

    Glenn,

    I have removed the js that you mentioned and then had to search for ages for the css you also mentioned as the stylesheet is maaahooosive lol.

    Eventually found it and it now displays as I want it, to say that I am thankful is an understatement!

    Thank you thank you thank you!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •