Click here to Skip to main content
15,886,919 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
XML
<html>
<head>
<style>
    #ca {
        display: none;
    }
</style>

<script src="/jquery.min.js" type="text/javascript"></script>
<script>

$(document).ready(function() {
    $("input:radio").click(function() {
        $('.searchSelect').hide();
        $('#' + $(this).attr("value")).show();
    });
});
</script>
</head>
<body>
    <ul id="countrylist">
        <li>
            <label for="US-country">
                <input name="store" id="US-country" type="radio" value="com" checked="checked" />
                USA</label>
        </li>
        <li>
            <label for="CA-country">
                <input name="store" id="CA-country" type="radio" value="ca"/>
                Canada</label>
        </li>
    </ul>
    <select name="search-alias-us" id="com" class="searchSelect" title="Search in">
        <option value="aps" selected="selected">All Departments</option>
        <option value="apparel">Apparel &amp; Accessories</option>
        <option value="automotive">Automotive</option>
    </select>
    <select name="search-alias-ca" id="ca" class="searchSelect" title="Search in">
        <option value="aps" selected="selected">All Departments</option>
        <option value="stripbooks">Books</option>
        <option value="popular">Music</option>
    </select>
</body>
</html>
Posted

I wrote script src wroungly
JavaScript
<script src="/jquery.min.js" type="text/javascript"></script>
after i change as
<script src="jquery.min.js" type="text/javascript"></script>

it is working Fine now

Thanks
 
Share this answer
 
v2
Write the code for dropdown in radio button changing event..........
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900