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 6112185
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T14:42:57+00:00 2026-05-23T14:42:57+00:00

Ok, that probably doesn’t make a ton of sense… let me illustrate: <div class=csl-entry>

  • 0

Ok, that probably doesn’t make a ton of sense… let me illustrate:

<div class="csl-entry">
lorem ipsum yada yada yada...
<a title="some title" rel="external" href="http://google.com">Google</a>
</div>

I would like to wrap the “lorem ipsum yada yada yada…” in a <p> tag, but am unsure how to proceed without also wrapping the <a>.

If it’s easier to do in JavaScript or jQuery, I’m fine with that, too. Much of my site is semi-dependent on a bit of JS anyway.

Thanks!

  • 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-05-23T14:42:58+00:00Added an answer on May 23, 2026 at 2:42 pm

    Using jquery

    $('.csl-entry').contents().filter(function() {
    
      return this.nodeType == 3;
    
    }).wrap('<p></p>')
                })
    

    Please note that this will wrap all text nodes that are children of csl-entry – so if you have any stray spaces in the div you will get an empty paragraph tag.

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

Sidebar

Related Questions

Sorry, that title probably doesn't make much sense, but what I want to know
Ok, so that title probably doesn't explain my question well. Hopefully this makes sense.
Although it probably doesn't happen often, it could happen that UserA is logged in
That title probably doesn't sound right, but forgive me, I'm learning Rails for the
I hope this makes sense. I'm using Java with the Slick2d library, that probably
I know that this probably doesn't really matter, but I would like to know
I have struggled with this since day 1. It probably doesn't help that I've
This probably doesn't even need asking, but I want to make sure I'm right
I've got a question that probably has a pretty simple answer, but I didn't
What's best, a repeating background of 100px wide so that the actual file doesn't

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.