Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7760385
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T13:52:25+00:00 2026-06-01T13:52:25+00:00

I have the following html where I use the jquery after method() to stick

  • 0

I have the following html where I use the jquery after method() to stick in some new HTML. This works fine but I now have a situation where I don’t want it to apply the after() method under certain conditions (where an additional class exists in a top TD) and i am trying to figure out the correct jquery selector syntax.

To make this more concrete, to start, I have the following html:

 <td class="fc-widget-content">
 <div>
      <div class="fc-day-number">1</div>
      <div class="fc-day-content">
  </div>
  </td>

and I want the following logic: I want to stick this html:

      <span class="addEventHidden" style="display: none;">
            <img src="/Content/Images/addEvent.gif">
      </span>

right after the fc-day-number div. I can do this easily by doing this:

$('.fc-day-number').after(function () {
    return "<span class='addEventHidden' style='display: none;'><img src='/Content/Images/addEvent.gif'></span>";
});

this works great except in some cases I don’t want to run the .after() method if the top div has this extra class: fc-other-month

so apply this after command if the top looks like this:

 <td class="fc-widget-content">

but NOT if the top TD looks like this:

 <td class="fc-widget-content fc-other-month">
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T13:52:26+00:00Added an answer on June 1, 2026 at 1:52 pm

    Try:

    $('td.fc-widget-content:not(.fc-other-month) div.fc-day-number')
        .after('<span class="addEventHidden" ... >');
    

    Example has line break for clarity. Replace <span class="addEventHidden" ... > with legit html.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I use the following JQuery in chrome: $(this).val().length this represents an input field. Now
I have the following page: http://valogiannis.com/freelancer/neurosport/register.html I use a validation jquery plugin: http://docs.jquery.com/Plugins/Validation When
I have the following HTML w/Javascript code (note: this only works in Internet Explorer):
I have been using the jquery appear plugin for some time now, but it
I have the following html and like to know how to use xpath to
I have the following HTML: <span id=UnitCost5>$3,079.95 to $3,479.95</span> And i want to use
How can I use JQuery to do the following with the below HTML: I
I have been adding new elements via jQuery in some of my projects, and
I have a some html being generated by JQuery on a Share Point page.
I have the following HTML <select onchange=this.form.submit() name=name> <option value=9995101E01#17201044055PM>9995101E01#17201044055PM</option> <option value=GRR-Example>GRR-Example</option> <option value=admin>admin</option>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.