Grab Text storing it in a var then adding html method and adding animation to it I want to know the correct way to finish up this code at the bottom. I'm thinking there has to be a better way to grab content from one section of your site and displaying it somewhere else with animation attached to it. The Code below seems like it can do better. I post the entire code below, but you might be able to understand what i'm trying to accomplish just by reading this few lines of code. I left comments to help

// Find what input field was clicked
var formVaule = $('input[value="' + ValUe + '"]');

// Find the content and store it.
var k = formVaule.next().text();

// Display H2 tag with the content that was stored 
$('#' + ValUe).html('&lt;h2&gt;' + k + '&lt;/h2&gt;');

// Animated the h2 tag with a background color
$('#' + ValUe).find('h2').animate({ backgroundColor: "#40822B" }, 100, 

// Call a callback function with the attention of removing the background.
function() {

    $('#' + ValUe).find('h2').animate({  backgroundColor: "white"}, 500);

});


Full code Below

&lt;form&gt;
    &lt;input type="radio" name="form" value="informed"/&gt;
    &lt;span&gt;INFORMED CONSENT&lt;/span&gt;&lt;br /&gt;
    &lt;input type="radio" name="form" value="release"/&gt;
    &lt;span&gt;RELEASE OF INFORMATION&lt;/span&gt;&lt;br /&gt;
    &lt;input type="radio" name="form" value="intake"/&gt;
    &lt;span&gt;INTAKE FORM&lt;/span&gt;&lt;br /&gt;
    &lt;input type="radio" name="form" value="checklist"/&gt;
    &lt;span&gt;CHECKLIST OF CONCERNS (CHILD &amp; ADOLESCENT AND ADULT)&lt;/span&gt;&lt;br /&gt;
    &lt;input type="radio" name="form" value="health"/&gt;
    &lt;span&gt;HEALTH INFORMATION PRIVACY FORM&lt;/span&gt;&lt;br /&gt;
&lt;/form&gt;

&lt;div id="informed" class="Form"&gt;1&lt;/div&gt;
&lt;div id="release" class="Form"&gt;2&lt;/div&gt;
&lt;div id="intake" class="Form"&gt;3&lt;/div&gt;
&lt;div id="checklist" class="Form"&gt;4&lt;/div&gt;
&lt;div id="health" class="Form"&gt;5&lt;/div&gt;
&lt;div id="ContactFormSix" class="Form"&gt;6&lt;/div&gt;

&lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"&gt;&lt;/script&gt;
&lt;script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.1/jquery-ui.min.js"&gt;&lt;/script&gt;

&lt;script&gt;
var myForm = new Array("INFORMED CONSENT","RELEASE OF INFORMATION","INTAKE FORM");

$(document).ready(function () {
    $('input').on( 'change', function () {
        //check
        var ValUe = $(this).val();
        $('.Form').hide();
        $('#' + ValUe).show();

        //Find the value of the input that was clicked
        var formVaule = $('input[value="' + ValUe + '"]');

        //Grab the value of the input that was clicked and find the next element and retreive the text
         var k = formVaule.next().text();

        //Prepend the elemnts text
        $('#' + ValUe).html('&lt;h2&gt;' + k + '&lt;/h2&gt;');

        $('#' + ValUe).find('h2').animate({ backgroundColor: "#40822B" }, 100, function() {
            $('#' + ValUe).find('h2').animate({  backgroundColor: "white"}, 500);
        });
    });
});
&lt;/script&gt;
At first, you are requesting the element # + ValUe 4 times. That means jQuery need to search to the entire DOM 4 times to get an element. Cache the value of this element and use that cache variable:

var elem = $('#' + ValUe);

elem.html(...);

elem.find(...);


$(this) inside the callback of the .animate method refers to the animated element, you don't need to use $('#' + ValUe).find('h2') again, just use $(this).

You use formVaule once, just use that constructor instead of saving it to a variable.

To complete correct code:

var k = $('input[value="' + ValUe + '"]').next().text();
var elem = $('#' + ValUe);

// Display H2 tag with the content that was stored 
elem.html('&lt;h2&gt;' + k + '&lt;/h2&gt;');

// Animated the h2 tag with a background color
elem.find('h2').animate({ backgroundColor: "#40822B" }, 100, function() {
    // Call a callback function with the attention of removing the background.

    $(this).animate({  backgroundColor: "white"}, 500);

});