facebook

dynamic list help : CLOSED

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #349240 Reply

    AdamRogan
    Member

    dynamic list demo
    how would you go about showing one image on list view and a different image in details page?
    im parsing a xml file.
    <root>
    <item>
    <title>xxxxxxxxxx</title>
    <thumb>http://image.png</thumb&gt;
    <link>http://someone.com.</link&gt;
    <image>http://image1.png</image&gt;
    </item>
    so i want the <thumb> image in list view and the <image> in details page. i can do either one but am unable to do both together.
    Or is their a way to just show the top 150px of image in list view then show full image in details.
    js
    $(clone).attr(“data-listitem-index” , i);
    $(“div[id*=txtTitle]” , clone).text( item[“title”] );
    $(“div[id*=txtDesc]” , clone).text( item[“description”] );
    $(“div[id*=htmDesc]” , clone).html( item[“description”] );
    $(“img[id*=imgImage]” , clone).attr( “src” , item[“image”] );

    $(“div[id*=txtTitle]” , clone).css(“overflow” , “hidden”);
    $(“div[id*=txtDesc]” , clone).css(“overflow” , “hidden”);

    var title = item[“title”];
    var desc = item[“desc”];
    var image = item[“image”];

    $(“#m1-view_game-txtAppTitle”).text(title);
    $(“#m1-view_game-txtAppType”).html(desc);
    $(“#m1-view_game-img”).attr(“src” , image);

    title: $this.find(“title”).text(),
    desc: $this.find(“description”).text(),
    image: $this.find(“image”).text(),
    thnx in advance

    #349256 Reply

    Hi adrog,

    Does your xml file contain url to both images? If yes, have you tried something like:

    $(“img[id*=imgImage]” , clone).attr( “src” , item[“thumb”] );


    var image = item[“image”];
    $(“#m1-view_game-img”).attr(“src” , image);

    #349301 Reply

    AdamRogan
    Member

    Yea tried that!
    yes i have thumb link and image link.
    when i am able to retrieve thumb image, it shows in details page as well.
    Im stuck on getting both to work at once. Not sure what i am doing incorrect.

    #349325 Reply

    AdamRogan
    Member

    another option?
    is their a way i can show or display top half of image in list item images, and show the whole image in details page.

    Also how can i create a gap between the list item widgets

    thanks

    #349398 Reply

    AdamRogan
    Member

    ok worked out the thumb image thanks very much for your help.
    to get the thumb image i did/
    $(“img[id*=imgImage]” , clone).attr( “src” , item[“thumb”] );
    thumb: $this.find(“thumb”).text(),

    Now one last thing i need help with is creating a gap between the list items.
    would that be in the css file or in the custom javascript file?
    i have been tinkering with both but have not achieved what i am after.
    i want to have probably 5 to 10 px gap between list items.
    help would be awesome thnx.

    #349408 Reply

    AdamRogan
    Member

    close this i worked it out
    cheers

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: dynamic list help : CLOSED

You must be logged in to post in the forum log in