Results 1 to 3 of 3

Thread: Can I get the el to an item shown in a list

  1. #1
    Sencha User
    Join Date
    Sep 2013
    Posts
    14
    Answers
    1
    Vote Rating
    0
      0  

    Default Answered: Can I get the el to an item shown in a list

    Hi,

    I have a list using a template to show data from a store. Part of this data includes an image.
    Initially a placeholder image is shown while the correct image is located via an ajax request.

    What I would like to do is show a loading mask over each image while the request is loading the data.
    How can I get a reference/el to the image on each row of the list, assuming that the image has been assigned an id?

    Example template:
    Code:
    <img id="imgList" src="{defaultImageURL}" style="height:160px;vertical-align: top;">
    Using Sencha Touch 2.3.1.

    Thanks.

  2. Excellent, that does what I need.

  3. #2
    Sencha User jerome76's Avatar
    Join Date
    Apr 2012
    Location
    New Jersey
    Posts
    1,149
    Answers
    132
    Vote Rating
    100
      0  

    Default

    You can try Ext.query,
    Code:
    var images = Ext.query('img#imgList');
    //or
    var images = Ext.query('#imgList');
    Both should return an array of the elements that match the selector.
    Sencha Touch 2.x
    Ext.ux.MultiBadgeButton - Forum | GitHub
    Ext.field.SmallRadio - Forum | GitHub

    Ext JS 4.x
    Ext Calendar Pro - Time Indicator - Forum| GitHub

  4. #3
    Sencha User
    Join Date
    Sep 2013
    Posts
    14
    Answers
    1
    Vote Rating
    0
      0  

    Default

    Excellent, that does what I need.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •