jQuery slice() function taking indexes of the first and the last needed elements selects a subset of the matched elements. Note what it doesn’t include last element itself.
In your particular case you should use
$("#myDiv a").slice(1, 4)
More Related Contents:
- How to send data to the server via Ajax?
- Calculate Javascript pixel widths for list of elements
- Making a quiz in HTML and Javascript [closed]
- How to find certain text in HTML
- Download a file by jQuery.Ajax
- Escaping HTML strings with jQuery
- change type of input field with jQuery
- JavaScript/JQuery: $(window).resize how to fire AFTER the resize is completed?
- How to check file input size with jQuery?
- iFrame src change event detection?
- Concise way to compare against multiple values [duplicate]
- Javascript Drag and drop for touch devices [closed]
- Caching a jquery ajax response in javascript/browser
- How can I disable a browser or element scrollbar, but still allow scrolling with wheel or arrow keys?
- How do you detect the clearing of a “search” HTML5 input?
- How to intercept window.location change
- fancybox bug with trigger click
- Load HTML page dynamically into div with jQuery
- jQuery position DIV fixed at top on scroll
- Selecting an ID with a colon in it with jQuery
- Using JQuery plugins that transform the DOM in React Components?
- JavaScript Regex to match a URL in a field of text
- The data-toggle attributes in Twitter Bootstrap
- JQuery show and hide div on mouse click (animate)
- JSON to string variable dump
- How do you swap DIVs on mouseover (jQuery)?
- how to update time regularly?
- jquery keypress event object keyCode for firefox problem?
- XMLHttpRequest; Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-resource [duplicate]
- How is AngularJS different from jQuery