- Dom
- click
- inArray
- merge objects
- query string
- smartcheck
- attr
- addClass
- hasClass
- removeClass
- append
- prepend
- remove
- has
- findAll
- empty
- position
- offset
- outerWidth
- outerHeight
- replaceWith
- html
- text
- val
- parseHTML
- parseJSON
- parent
- next
- prev
- first
- last
- now
- toArray
- size
- Manipulation
- dates compare
- getMonthName
- getDayName
- .NET JSON date
- hashtag
- number Format
- pad
- smallCase
- upperCase
- Forms
- focus
- mobile number
- repetition
- placeholder
- Browser
- browser feature
- Browser Information
- Effects
- hide
- show
- sticky
- scrolline
- goUp
- Animation
- circles
- Google analytics
- Google fonts
.parseHTML()
Description: Parse HTML into an HTMLCollection
Example:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>now demo</title>
<script src="http://code.bitsycode.com/bitsycode-latest.min.js"></script>
</head>
<body>
<div class="container"></div>
<script>
bitsyCode.ready(function(){
var htmlCollection = bitsyCode.parseHTML('<!DOCTYPE html><html><head><title>Title Tag</title></head><body><a href="#">Anchor Tag</a><p>Paragraph Tag</p><b>Bold Tag</b></body></html>', true);
for (var i=0; i < htmlCollection.length; i++) {
bitsyCode(".container").append(bitsyCode(htmlCollection[i]).text() + "<br />");
}
})
</script>
</body>
</html>
Preview:
Title Tag
Anchor Tag
Paragraph Tag
Bold Tag
Anchor Tag
Paragraph Tag
Bold Tag
Share