" .each"

Where's the "$" or "jQuery" so it's "$.each" or "jQuery.each"

And why hog up memory with an array just to join the array?  .append
makes a whole lot more sense there


On Apr 18, 2:42 pm, Rick Faircloth <r...@whitestonemedia.com> wrote:
> I know this is out of context, but assuming everything is correct...is
> anything wrong with this code?
> I get data in Firebug, no errors, but none of the code below is written into
> the DOM...
>
> Thoughts?
>
> Thanks,
>
> Rick
>
> --------------------------------------------------------------------------
>
>  function populateSectionsDivs(response) {
>
>    $('#viewSectionsForEditDIV').empty();
>
>    var out = [];
>
>    .each(response.QGETSTORYINFO.DATA, function(i, row) {
>
>     out.push('<div id="storyTitleDIV" style="font-weight:bold; height:12px;
> border:1px solid blue;">'Title: ' + row[1]</div>');
>     out.push('<div style="height:12px;"></div>');
>     out.push('<div id="sectionPhotoDIV" style="width:200px; float:right;
> border:1px solid black; height:250px; margin-left:15px;
> margin-bottom:10px;"><img src="../site_images/' + row[5] + '"></div>');
>     out.push('<div id="sectionSubtitleDIV" style="font-style:italic;
> height:12px;">row[3]</div>');
>     out.push('<div style="height:12px;"></div>');
>     out.push('<div id="sectionTextDIV"
> style="text-align:justify;">row[4]</div>');
>     out.push('<div style="height:50px;"></div>');
>
>    });
>
>    $('#viewSectionsForEditDIV').html(out.join(''));
>    $('#viewSectionsForEditDIV:hidden').fadeIn(500);
>   }
>
> -----------------------------------------------------------------------------------------------------------------------------------------------------------------
> "It has been my experience that most bad government is the result of too
> much government." - Thomas Jefferson

Reply via email to