LOOP jQuery Object

by nickadeemus2002

HTML

<input type="checkbox" id="1a" value="Texas">
<input type="checkbox" id="2a" value="Tech">
<input type="checkbox" id="3a" value="Baylor">

<p class="boringText" id="1"> This is a paragraph...#1</p>
<p class="boringText" id="2"> Paragraph #2 is here</p>
<p class="boringText" id="3"> Did you know paragraph #3 is in the house?</p>
<p class="boringText" id="4"> Yo, #4 is here now.</p>
<p class="boringText" id="5"> End of the line with paragraph #5</p>
<div id="result"></div>

CSS

p{padding:5px;margin:10px; border: 2px solid #585858;}
.highlight{color:#ff0000;background-color:#eee;}

JavaScript

/*
$('input:checkbox').bind('click', function(){
    if($(this).is(':checked')){
          var currentValue = this.value;
        if(currentValue !== undefined){
            alert(currentValue);
        }
    }
});
*/
var paragraphs = $('p');
var len = paragraphs.length;
    for (var key in paragraphs){
        var obj = paragraphs[key];
        for (var prop in obj) {
            if(prop === "textContent"){
               var visualProp=prop + " : " + obj[prop];
           $('<p class="highlight">'+visualProp+'</p>')
              .insertAfter('body');                
            }
            if(prop === "innerText"){
                var visualProp=prop + " : " + obj[prop];      
                          $('<p class="highlight">'+visualProp+'</p>')
              .insertAfter('body'); 
            }
            if(prop === "nextSibling"){
                 var visualProp=prop + " : " + obj[prop];      
                          $('<p class="highlight">'+visualProp+'</p>')
              .insertAfter('body'); 
            }           
        } 
    }