var attr = $(this).attr('name');
// For some browsers, `attr` is undefined; for others,
// `attr` is false. Check for both.
if (typeof attr !== 'undefined' && attr !== false) {
// ...
}
More Related Contents:
- How to change the bootstrap css width into 1000px? [closed]
- jQuery callback for multiple ajax calls
- Validate that end date is greater than start date with jQuery
- jQuery templating engines [closed]
- AngularJS + JQuery : How to get dynamic content working in angularjs
- jQuery form validation on button click
- Detect image load
- Using jquery to get all checked checkboxes with a certain class name
- jQuery selector for the label of a checkbox
- Live search through table rows
- How to compare two date values with jQuery [duplicate]
- How do I PUT data to Rails using JQuery
- Iterating over element attributes with jQuery
- Limit number of characters in input field
- Passing dynamic json object to C# MVC controller
- Ajax Not working in IOS 9.0 Cordova
- Highlight dates in specific range with jQuery’s datepicker
- How can one use JQuery to validate email addresses?
- JQM (jQueryMobile) Dynamically added elements not displaying correctly and CSS is not applied
- jQuery Validation with multi-part form
- How to make my ‘click’ function work with iOS
- Wrap elements inside a div using jQuery
- bootstrap-typeahead.js add a listener on select event
- Rails 3 UJS – controller gets called twice by link_to :remote
- jQuery trigger custom event synchronously?
- access div in iframe parent
- How to Handle Button Click Events in jQuery?
- jQuery Removing specific text from an element
- Highlight text inside html with jQuery
- How do I select the parent form based on which submit button is clicked?