I am not really used to RegEx. If the return html is like this, how to
add an attribute to .msg-item before parsing out?

<li class="msg-item">
    <div class="msg-avatar">
        <a class="noborder-img" href="/nvthoai"><img src="http://
kuckustorage.blob.core.windows.net/kuckuimages/53a2ceb8-de2c-4601-a862-
c78d9e634ca6.jpg?timeout=240" alt="Avatar" width="50" height="50"/></
a>
    </div>
    <div class="msg-body">
        <span class="msg-text"><a href="/nvthoai">nvthoai</a> hi</
span>

        <span class="msg-timestamp">Cách đây 10 giờ</span>
        <div id="msg_action_5408" class="msg-actions">
                       <a class="msg-action-reply">Trả lời</
a>                                 <a class="msg-action-delete">Xóa</
a>                                <a class="msg-action-quote">Trích
dẫn</a>                        <a class="msg-action-fav">Thích</
a>
        </div>
        <a class="msg-action-isfav" style="display:none"></a>

    </div>
    <div class="msg-dotted-line"></div>
</li>



On Aug 2, 4:03 pm, Stefano <ares...@gmail.com> wrote:
> try regular expressions
>
> http://www.w3schools.com/jsref/jsref_obj_regexp.asphttp://www.w3schools.com/js/js_obj_regexp.asp
> orhttp://www.regular-expressions.info/javascript.htmlhttp://www.regular-expressions.info/javascriptexample.html
>
> maybe it helps ;)
>
> On 2 Aug., 21:13, cohq82 <quang...@gmail.com> wrote:
>
> > Hi all,
>
> > I have my website getting a value as a result of an ajax call. After
> > that, I would like to insert that result (a string) into a tag.
> > However, I would like to insert that result in a way that (1) it must
> > have opacity = 0, then (2) it will slideDown() so the whole content
> > list being pushed down using animation, and finally (3) change opacity
> > = 1. Imagine this is just like a Facebook message list insert process
>
> > The way I am planning to do this is to return the result string from
> > ajax to opacity=0 first. However, I don't know how to use jQuery to
> > select a tag from within a string. I know jQuery only select from the
> > DOM. So how to do this? Any advice?
>
> > Thanks

Reply via email to