Sure thing..

XML DOC:
<?xml version="1.0" encoding="ISO-8859-1"?>
<schedule>
        <show>
                <date>Monday, May 14, 2007</date>
                <dayofweek>Monday</dayofweek>
                <image>051407.jpg</image>
                <title>San Antonio Hosts Training for Ministry
Conference</title>
                <description>Text Here</description>
                <filename>2007-5-14.asx</filename>
                <guests/>
                <specialoffer>Names of God bracelet</specialoffer>
                <specialofferproductid>431</specialofferproductid>
        </show>
        <show>
                <date>Tuesday, May 15, 2007</date>
                <dayofweek>Tuesday</dayofweek>
                <image>051507.jpg</image>
                <title>Training for Ministry Conference Impacts the
Alamo City</
title>
                <description>More Text Here</description>
                <filename>2007-5-15.asx</filename>
                <guests/>
                <specialoffer>Names of God bracelet</specialoffer>
                <specialofferproductid>431</specialofferproductid>
        </show>
</schedule>

JQUERY CODE:
<script type="text/javascript">
         $(function() {
                $.ajax({url: 'tiydschedule.xml',
                                type: 'GET',
                                dataType: 'xml',
                                timeout: 1000,
                                error: function(){
                                alert('Error loading XML document');
                        },
                        success: function(xml){
                               $('show',xml).each(function(id){
                                        var date = $('date',this).text();
                                var dayofweek = $('dayofweek',this).text();
                                var image = $('image',this).text();
                                var title = $('title',this).text();
                                var description = $('description',this).text();
                                var filename = $('filename',this).text();
                                var guests = $('guests',this).text();
                                var specialoffer = 
$('specialoffer',this).text();
                                var specialofferproductid = $
('specialofferproductid',this).text();
                        var divthumbnails = '<div><h4>'+dayofweek+'</h4><p><img
src="/images/weekly_guide/'+image+'" class="today" width="105"
height="75"/></p></div>';
                        var divdetails = '<div 
id="'+dayofweek+'"><div><h4>'+date
+'</h4></div><div><a href="/media/'+filename+'"><img src="/images/
weekly_guide/'+image+'" /></a></div><h2>'+title+'<br/><a href="/
media/'+filename+'">watch now&#187;</a></h2><p>'+description+'</
p><h3>Todays Offers:</h3><p><ul><li><a href="/shopping/
product_detail.cfm/itemid/'+specialofferproductid+'">'+specialoffer+'</
a></li></ul></p></div>';
                        $('.wkguidedays').append(divthumbnails);
                        $('.wkguidetoday').append(divdetails).hide();
                        $('.wkguidetoday:first').show();
                       });
                        }
                });
                $('.wkguidetoday:first').show();
         });

</script>

HTML CODE:
<div id="UserSection">
        <div class="section">
                <div class="wkguidedays"></div>

                <div class="wkguidetoday"></div>

        </div>
</div>

The thumbnail images are appended to div class="wkguidedays" on
document load (working);
The details are appended to div class="wkguidetoday" and set to hide
on document load (working);
I then need only the first one of the details to initially show in the
div class="wkguidetoday" (not working). Not sure what code to write, I
currently have:
$('.wkguidetoday:first').show(); however that's not working.

Thanks for the help!

--Marcus Cox

On May 15, 12:29 pm, "Benjamin Sterling"
<[EMAIL PROTECTED]> wrote:
> Marcus,
> Would you mind sending what you have so far, my brain is not working real
> well today and would help more if I have what you have?
>
> --
> Benjamin Sterlinghttp://www.KenzoMedia.comhttp://www.KenzoHosting.com

Reply via email to