You need to call native DOM click()
method in order to fire default clicking anchor behaviour, jQuery specifically excludes it on anchor:
$(document).ready(function() {
$(".button2")[0].click();
});
-jsFiddle-
More Related Contents:
- triggerHandler vs. trigger in jQuery
- How Can I remove multiple times Children from the following code
- get CSS rule’s percentage value in jQuery
- jQuery selectors with variables
- jqGrid paging question
- Email validation using jQuery
- jQuery .on function for future elements, as .live is deprecated [duplicate]
- How do I add options to a DropDownList using jQuery?
- jQuery Uncaught TypeError: Property ‘$’ of object [object Window] is not a function
- How to combine two jQuery results
- CORS jQuery AJAX request
- How to get a cookie from an AJAX response?
- Making radio buttons look like buttons instead
- Getting 400 bad request error in Jquery Ajax POST
- jQuery Plugin: Adding Callback functionality
- jQuery parse JSON multidimensional array
- Twitter Bootstrap – Tabs – URL doesn’t change
- Can I fade in a background image (CSS: background-image) with jQuery?
- Populate dropdown select with array using jQuery
- Dynamic Facebook Open Graph tags possible?
- How to launch jQuery Fancybox on page load?
- Validate dynamically added fields
- How do I get the real .height() of a overflow: hidden or overflow: scroll div?
- How to export all rows from Datatables using Ajax?
- Ajax jquery async return value
- jquery detecting div of certain class has been added to DOM
- jQuery: How can I create a simple overlay?
- jquery draggable: how to limit the draggable area?
- JQuery Validate multiple fields with one error
- How to remove disabled attribute with jQuery (IE) [duplicate]