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

  • Home
  • SEARCH
  • 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 6129299
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T16:43:34+00:00 2026-05-23T16:43:34+00:00

<div id=widgetAreaFooter> <div class=row>1</div> <div class=row>2</div> <div class=row>3</div> <div class=row>4</div> <div class=row>5</div> <div class=row>6</div>

  • 0
<div id="widgetAreaFooter">
<div class="row">1</div>
<div class="row">2</div>
<div class="row">3</div>
<div class="row">4</div>
<div class="row">5</div>
<div class="row">6</div>
<div class="row">7</div>
</div>

How to remove the 3 last div ?

I tryed this but it doesn’t work :/

var row = $( '#widgetAreaFooter>.row' );
var nbr = row.length ;

for ( var i=4;i<nbr;i++ ) row.get(i).remove();
or
for ( var i=4;i<nbr;i++ ) row[i].remove();
  • 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-23T16:43:34+00:00Added an answer on May 23, 2026 at 4:43 pm

    This will remove the last three elements:

    $('#widgetAreaFooter > .row').slice(-3).remove();
    

    jsFiddle Demo

    • You can get a part of a jQuery collection using .slice().

      If a negative number is provided,
      this indicates a position starting
      from the end of the set, rather than
      the beginning.

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

Sidebar

Related Questions

$('div#Categories > div.categories a#showhide').click(function(){ // Get the subManufacturers list var subCatList = $(this).parent().find('ul#hiddenSubCategories'); //
Each div with the class row is added upon request from the user, to
I have this div which acts a lens in zooming of the image. But
$('div#Settings ul li').click(function () { var url, template; var self = $(this); if (!$(self).hasClass('selected'))
var div = $(this), ul = $(ul, div), li = $(li, ul); Please explain,
I saw this: $(div).children().andSelf().contents().each(function(){ if (this.nodeType == 3) { var $this = $(this); $this.replaceWith($this.text().replace(/(\w)/g,
I have a div that looks like this <div class=listItem jrFeatured> I want it
$('div.box').html(hello) puts the word hello inside all my div's of class 'box'. They all
this div to cover up the viewport works perfect on IE 7, 8, FF,
struct Div { int i; int j; }; class A { public: A(); Div&

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.