1

Id like to remove a javascript function. On the page, search functionality has two states, a regular one and an advanced one. All the javascript does is when you press 'Advanced Search' it 'pulls' down a new box with extra options.

I simply want all the options available, all the time.

The page with the search on is here: http://property.begbies-traynor.com

Anyone shed any light on this? Im pretty new to javascript.

4
  • 1
    I dont quite understand what you mean, you no longwer what the adv. search button, but for all the options to always be showing? Commented Feb 1, 2012 at 10:27
  • 2
    Welcome to Stack Overflow! SO is not meant to be a "write code for me" site - if that's what you are looking for, you should probably hire an expert to do it for you. If you have a specific technical question arising of your working on the issue, feel free to edit the question accordingly. Commented Feb 1, 2012 at 10:28
  • Tryied anything? Like removing the triggering span and the "display:none" in CSS? Commented Feb 1, 2012 at 10:28
  • @DamienPirsy Obviously Wayners247 could not find what was the trigger and that the trigger manipulated the CSS... Commented Feb 1, 2012 at 10:50

2 Answers 2

1

remove this bold line

advanced-search {
display: none;
margin-bottom: -5px;
padding: 15px 0 0;
}

from http://property.begbies-traynor.com/wp-content/themes/property/style.css

and remove the button

<div id="advanced-search-btn">
        <span>Advanced Search</span>
    </div>
Sign up to request clarification or add additional context in comments.

2 Comments

Thank you for the POSITIVE responses. Im not asking for anyone to write anything for me, however as JS is something I know little about I was unsure about what else it may affect, hence asking the question here.
You are welcome. SO can be a little daunting since it is frowned upon to ask question like yours which are very localised. Also the reactions are aimed at people who would already know where to look for these things.
0

You can add a class to show it open when the document loads if thats what you mean? Why not just do it with CSS?

$(document).ready(function(){
    $('#advanced-search-btn').addClass('open');
}); 

In regards to you want to remove the JS function, why not just delete this also?

/** ADVANCED SERACH */

if ($.cookie('ts_advanced_search') == 'open') {
    $('#advanced-search').show();
    $('#advanced-search-btn').addClass('open');
}

$('#advanced-search-btn').click(function () {
    if ($("#advanced-search").is(":visible")) {
        $.cookie('ts_advanced_search', 'closed',{ expires: 60, path: '/' });
        $("#advanced-search div").animate(
            {
                opacity: "0"
            },
            150,
            function(){                 
                $('#advanced-search-btn').removeClass('open');
                $("#advanced-search").slideUp(150);
            }
        );
    }
    else {
        $("#advanced-search").slideDown(150, function(){
            $.cookie('ts_advanced_search', 'open',{ expires: 60, path: '/' });
            $("#advanced-search div").animate(
                {
                    opacity: "1"
                },
                150
            );              
            $('#advanced-search-btn').addClass('open');
        });
    }   
});

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.