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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T12:49:35+00:00 2026-05-13T12:49:35+00:00

I do have a element and its content some where on the page :

  • 0

I do have a element and its content some where on the page :

<div style="padding-bottom:9px; font-size:13px;line-height:25px;">          
  Fine quality, full grain pebble leather 
  <br>
  <div style="line-height: normal; margin-bottom: 6px; ">
     Sophisticated black with detailed accent lining
  </div>
  Tailored satin ribbon release pull-strap
  <br>
  Slim back pocket for an ID card or money
  <br>
  Ultra slim design
  <br>
  Shock-absorbent construction
  <br>
  Additional screen padding
  <br>
  Light and rigid protective layer
  <br>
  Soft velvet lining with light protective layer
  <br>
  <div style="line-height: normal; margin-bottom: 6px; ">
     Thinner and more streamlined than the Eléga Pouch
  </div>
  Sena high-quality handmade craftsmanship<br>      
</div>

What I want to is convert the content above to below with jQuery (I tried different ways but after all I kinda lost)

<div style="padding-bottom:9px; font-size:13px;line-height:25px;">            
  <div style="line-height: normal; margin-bottom: 6px;">
      Fine quality, full grain pebble leather
  </div>
  <br/>
  <div style="line-height: normal; margin-bottom: 6px; ">
     Sophisticated black with detailed accent lining
  </div>
  <br/>
  <div style="line-height: normal; margin-bottom: 6px; ">
     Tailored satin ribbon release pull-strap
  </div>
  <br/>
  <div style="line-height: normal; margin-bottom: 6px; ">
     Slim back pocket for an ID card or money
  </div>
  <br/>
  <div style="line-height: normal; margin-bottom: 6px; ">
     Tailored satin ribbon release pull-strap
  </div>
  <br/>
   ...
   ...
   ...      
</div>

Can you help me a little bit.

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-13T12:49:35+00:00Added an answer on May 13, 2026 at 12:49 pm

    Here is the solution I was looking for :

    jQuery("div").filter(lineHeight).contents(nonElementNodes).wrap("<div style='margin-bottom:9px;line-height:normal;margin-top:4px'>");
    
    jQuery("div").filter(lineHeight).find("br").remove();
    
    function lineHeight() {
      return this.style.lineHeight == "25px";
    }
    
    function nonElementNodes() {
      return this.nodeType !== 1 || this.tagName !== 'BR';
    }
    

    Source

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

Sidebar

Related Questions

In the middle of my page I have a div element with some content
I need to find an a -tag's ID by its style. My element have
There is a div element I have complete control over, including its contents, associated
I have a page with the following structure: div.wrapper > div.content > div.item +
I have an element which autosaves its contents via an AJAX call. Currently, whenever
I have an xml file that contains its element like <ab:test>Str</ab:test> When I am
I have a virtual class Element that forces its derived classes to have a
I have bind my element with the ko , and its working fine. My
I have a Zend_Form_Element_Multicheckbox and I want to put some of its elements in
I have some results on the page (firts 10), then with a load more

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.