Methods

Have a look at what Bitsycode has to offer you.

Bitsycode is packed with loads of awesome methods to assist you.




Methods

Listing of Bitsycode methods to make coding fun.


DOM


.click()

Add eventListener to an element. Allows for arguments to be passed to parameter function as a javascript object.

.inarray()

Search for value in JavaScript array with this BitsyCode method. This method finds values in array.

.mergeobjects()

Merge properties of different JavaScript objects into a single object.

.querystring()

Retrieve URL Query parameters using this BitsyCode method. This method allows you to get query string values by specifying...

.smartCheck()

Detect if a user is browsing your website with a smartphone. This method does mobile device detection to check if the device is...

.attr()

Get and set HTML attributes of elements using this BitsyCode method. Works with the JavaScript setAttribute and getAttribute...

.addClass()

Add HTML classes to an element with this BitsyCode method. By calling this method you will add an HTML class to an element.

.hasClass()

Check if an element has a specific class already assigned to it with this BitsyCode method.

.removeClass()

Remove a specific class from an element with this BitsyCode method. You can also remove all classes by calling this method.

.append()

Use this append method to insert content at the end of an element. Append content or DOM elements to a specified element.

.prepend()

Use this prepend method to insert content at the beginning of an element. prepend content or DOM elements to a specified...

.remove()

This method lets you remove or delete elements from the DOM. With this method you can remove a div or remove other elements.

.has()

Check if a parent has a child element. This method returns a true if the child has been found else a false is returned.

.findAll()

Search for children within the parent element. Find and return a child found in parent.

.empty()

Remove childnodes or a single node from parent with this BitsyCode method. This method does not return the node or childnodes...

.position()

Returns the current position of a div and other elements, that is relative to its parent element.

.offset()

Returns the element offset coordinates, returning offset top and offset left.

.outerWidth()

Get computed width of an element with this BitsyCode method.

.outerHeight()

Get computed height of an element with this BitsyCode method.

.replaceWith()

This BitsyCode method, replaces an existing DOM element with a new element or content that's user set.

.html()

Getting and setting HTML content of a div and other elements are just as easy with BitsyCode as it is with JQuery HTML()

.text()

Get and set the text content of a div and other elements with this BitsyCode method.

.val()

Get and Set values of most input types. This method simply sets and retrieve values of an input type.

.parseHTML()

An HTML parser using javascript. Use this BitsyCode method to parse your HTML code.

.parseJSON()

A JSON parser using javascript. Use this BitsyCode method to parse your JSON code.

.parent()

Get the parent of childnode with this BitsyCode method. Returns the parent node of the specified childnode.

.next()

Get the next element of the specified element with this BitsyCode method. Returns the next element of the specified element.

.prev()

Get the previous element of the specified element with this BitsyCode method. Returns the previous element of the specified...

.first()

Get the firstchildnode of a specified element with this BitsyCode method. Returns the firstchild node of a specified element.

.last()

Get the last childnode of a specified element with this BitsyCode method. Returns the last child node of a specified element.

.now()

Get your current local date and time with this BitsyCode method. There are a number of options for you to use with this method.

.toArray()

Effeciently convert JavaScript objects and strings to a JavaScript array using this BitsyCode method.

.size()

Get the length of a JavaScript Object, Array or String using this BitsyCode method.

MANIPULATION


.datescompare()

Compare JavaScript dates with this BitsyCode method. Compare Javascript dates with an object response.

.getMonthName()

Retrieve the month name in string value by passing through the numeric value.

.getDayName()

Retrieve the day name in string value by passing through the numeric value.

.jsondate() - Format .NET JSON Dates

Convert .NET JSON Format Dates using this BitsyCode method. This method allows you to use options to format json date.

.hashtag()

Get and set the URL hashtag with this BitsyCode method.

.numberformat()

Format and parse a number with this BitsyCode method. This method formats a number using JavaScript and options that you set.

.pad()

Pad a string to a certain length with this BitsyCode method. Add a pad of characters to a string up to a specified length.

.smallCase()

Convert string to lowercase. If value is not of type string, the value will be cast as a "String" before converted to lowerCase value.

.upperCase()

Convert string to lowercase. If value is not of type string, the value will be cast as a "String" before converted to upperCase value.

FORMS


.email()

Validate an email address with this BitsyCode method. Doing a JavaScript email validate is easy with this method.

.focus()

Set focus on elements using this BitsyCode method.

.mobilenumber()

Do a simple validation that validates most South African mobile numbers with this BitsyCode method.

.repetition()

Find repetition of characters in input fields with this BitsyCode method. Sometimes repetition validation on fields are needed...

.placeholder()

Add customizable placeholders on input type elements with this BitsyCode method.

BROWSER


.browserfeature()

HTML5 Test. Detect many browser features and capabilities, also check HTML5 Video support.

EFFECTS


.hide()

Hide an element on the page. A simple hide method to display a shown element.

.show()

Show an element that has been hidden on the page. A simple show method to display a hidden element.

.sticky()

Create a sticky header effect with this BitsyCode method. Stick an element to the top of the browser on scroll.

.scrolline()

Add a scroll line bar indicator on the your page with this BitsyCode method. There are options for customizing of the bar indicator.

.goUp()

Add a button on your web page to scroll to the top of the page when your content is really long.

ANIMATION


.circles()

Create a floating cirlces effect on your website with this BitsyCode method. This method has options for customization.

GOOGLE


.google('googleanalytics')

Add Google Analytics on your website with this BitsyCode method. This method adds the Google Analytics tracking code for you.

.google('googlefonts')

This method makes it easy to use Google fonts on your website. Use any of Googles web fonts, font styles and font effects...