if ( $('#myfav').children().length > 0 ) {
// do something
}
This should work. The children()
function returns a JQuery object that contains the children. So you just need to check the size and see if it has at least one child.
More Related Contents:
- How to filter the jqGrid data NOT using the built in search/filter box
- How can I trigger the same function from multiple events with jQuery?
- How to display messages from jQuery Validate plugin inside of Tooltipster tooltips?
- jQuery Datepicker onchange event issue
- Pass request headers in a jQuery AJAX GET call
- Should Jquery code go in header or footer?
- TypeError: $.ajax(…) is not a function?
- twitter bootstrap typeahead ajax example
- jQuery loop over JSON result from AJAX Success?
- jQuery Validate – require at least one field in a group to be filled
- Update div with jQuery ajax response html
- .delegate() vs .on()
- What is the difference between the bind and live methods in jQuery?
- Jquery click event not working after append method
- Button text toggle in jquery
- data.map is not a function
- How to split newline
- How do I check whether a jQuery element is in the DOM?
- How to make Bootstrap carousel slider use mobile left/right swipe
- jQuery-UI datepicker default date
- The $ dollar sign
- jQuery file upload: Is it possible to trigger upload with a submit button?
- CORS request – why are the cookies not sent?
- jQuery ajax request being block because Cross-Origin
- jqgrid nested subgrid 4th level subgrid always returns first rowid of the subgrid
- Call PHP Function using jQuery AJAX
- How to create cascading drop-down list
- Parsing of html string using jquery
- AJAX Post of JavaScript String Array to JsonResult as List Always Returns Null?
- JQuery Bootstrap Multiselect plugin – Set a value as selected in the multiselect dropdown