1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How to seprate this function for each radio?

Discussion in 'JavaScript' started by hallianonline, Dec 5, 2013.

  1. #1
    hi please help me how can i separate this function for each different radio name

    
    $(document).ready(function() {
        $("div.desc").hide();
        $("input[name$='sharedprices']").change(function() {
            $("div.desc").hide();
            $("#" + this.value).show();
        }).filter(function(){
            return this.checked;
        }).change();
    });
    Code (markup):

     
    Solved! View solution.
    hallianonline, Dec 5, 2013 IP
  2. #2
    use the getElementByID function and give your radio buttons different IDs.
     
    ByteCoder, Dec 5, 2013 IP
  3. hallianonline

    hallianonline Active Member

    Messages:
    104
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    53
    #3
    how can i any reference
     
    hallianonline, Dec 6, 2013 IP
  4. ByteCoder

    ByteCoder Active Member

    Messages:
    239
    Likes Received:
    2
    Best Answers:
    2
    Trophy Points:
    65
    #4
    Try googling a little.. here's something that could get you started:
    http://www.w3schools.com/jsref/met_doc_getelementbyid.asp

    I think you should read about HTML & javascript/jquery in w3schools if you lack this knowledge.
    If you get some sort of code and having trouble - post the code and I'll gladly help.
     
    ByteCoder, Dec 6, 2013 IP