SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Apr 2009
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    use jqurey to remove a tag from table td

    Hello,
    would someone help me on how i can use jquery to remove the a tag from this table tb?
    here the code

    <td class="tue past has-events" id="2012_calendar-2011-11-01">
    <div class="inner"><div class="month day"> 1</div><div class="view-item view-item-2012_calendar">
    <div class="calendar.1164.field_time.0.0 calendar monthview">
    <div class="view-field view-data-node-vid node-vid">

    <span class="tcm-speaker-nopop">Alex</span> </div>
    <div class="view-field view-data-node-data-field-time-field-time-value node-data-field-time-field-time-value">

    <span class="tcm-time-nopop"><span class="date-display-single"><span class="date-display-start">11:00 am</span><span class="date-display-separator"> - </span><span class="date-display-end">12:00 pm</span></span></span> </div>
    <div class="view-field view-data-node-title node-title">
    <a href="/free-course/preview-mix-match-30-formulas">A Preview</a> </div>
    </div>
    </div>
    </div> </td>
    I want use jquery DOM to remove the a tag.
    I need to grab that from the class (tb.past) down to the a tag in letter red.
    I have tried the (td.pass > a) doens't work form.

    Any advice.

    thx

  2. #2
    Non-Member
    Join Date
    Apr 2011
    Location
    no fixed address
    Posts
    851
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by sshhll View Post
    I want use jquery DOM to remove the a tag.
    Why use jQuery?

    You can remove each with just a single line of plain javascript code.

  3. #3
    SitePoint Enthusiast
    Join Date
    Apr 2009
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    web,
    try to mod the orignal jqury script that came with drupal calendar pop up module.
    i want to make some change in there .
    this is the begnning of the script. some how if i can grab the table tb a tag, i will have what i need.
    couldn't figure out to grab that a tag from above codes
    the orginal script.
    btw: i need to grab the a tag from the table tb class.

    $('div.view-field > a').attr('class', 'popup');
    // on click of a link
    $('a.popup').click(function(a) {
    }


Bookmarks

Posting Permissions

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