AZ Standard Functions

AZ Promise Type: Functions
    $.publish()
    $.subscribe()
    $.subscribeonce()
    $.unsubscribe()

Based on jQuery Promise, we have created several functions you can subscribe on that will help you get a better flow in your code. The principles are based on Events & Delegates, which is a good form of programming practice and should replace all forms of use of Callback.

$.publish("Location - Name", Data);

$.subscribe("Location - Name", function (e, data) { });

$.subscribeonce("Location - Name", function (e, data) { });

$.unsubscribe("Location - Name", function (e, data) { });

AZ Window Scroll Type: Function
$.subscribe("functionlib/azWindowScroll", function (e, data)
{
    data.azWindowScrollTop
    data.azWindowScrollDir
});


This function is triggered every time you scroll.

azWindowScrollTop:
azWindowScrollDir:
AZ Window Resize Type: Function
$.subscribe("functionlib/azWindowResize", function (e, data)
{
    data.azWindowWidth
    data.azWindowHeight
    data.azWindowScrollTop
    data.azWindowScrollLeft
    data.azWindowOrientation
});


This function is triggered when the page loads and every time the page resizes.

azWindowWidth:
azWindowHeight:
azWindowScrollTop:
azWindowScrollLeft:
azWindowOrientation:
AZ Client Storage Type: Function Input: Varying data types Parameters: ActionType - Name - Value Return: Data - Objects, Arrays, String, Integer...
AZClientStorage(ActionType, Name, Value);

This function is used to store and retrieve data, (Items) from the browser. AZClientStorage will automatically test if your browser supports storage. First Local Storage is tested, and if your browser supports this, your data will be stored in Local Storage. However, if your browser does not support Local Storage, it will try to store data in Cookies.

ActionType Name Value
set Item Name Varying data types
get Item Name
delete (remove) Item Name


Store data
var _Customers = [{"Name": "Hansen"}, {"Name": "Olsen"}, {"Name": "Andersen"}];
AZClientStorage("set", "Customers", _Customers);

In addition to Item Name, the function adds the site's domain name - www.yourdomain.no-itemname. You can store virtually any type of data. Objects and Arrays will be automatically stringified.

Get data
var _Customers = $.parseJSON(AZClientStorage("get", "Customers"));

If you have stored an Object or an Array, you will need to parse this from a string to a JavaScript Object. For example, you can use JSON Parse.

Delete data
AZClientStorage("delete", "Customers");


Before testing the function, open the console in your browser and find the tab - Application and Local Storage.
AZ Show/Hide CoverSpin Type: Function Input: string
AZShowCoverSpin();


AZShowCoverSpin("Show Cover Spin");


AZHideCoverSpin();

AZ Sort JSON Array Type: Function
AZSortJSONArray(Array, Property, Order);

Unsorted
[{"Name": "Hansen"}, {"Name": "Olsen"}, {"Name": "Andersen"}]


IsEmpty Type: Function Input: object Return: true or false
IsEmpty(Object);

The function returns false if you are testing an Object and the Object is not empty and has at least one property.
AZ Get URL Parameters Type: Function Input: String Parameters: URL Default: window.location.href
AZGetURLParameters(Url);

https://cdn.web2net.no/lib-2.0.0/default.html?id=1&guid=23j4j223k54k235k


Before testing the function, open the console in your browser and find the tab - Console
AZ Bytes Converter Type: Function Input: Integer Parameters: Bytes - Decimal Default: 2 decimal
AZBytesConverter(Bytes, Decimal);

123456 - 987654321


AZ Get Object (from Array) Type: Function Input: Array - String - String Parameters: Array - Key - Val
AZGetObject(Array, Key, Val);

The function retrieves a specific Object from nested Objects or Arrays, no matter how many levels the Object or Array is nested.


Before testing the function, open the console in your browser and find the tab - Console

Under ser du også et eksempel på å bruke Promise ved hjelp av funksjonen $.when

Animation...



function Effect()
{
    return $("div.az-anim-rect").each(function (i)
    {
        $(this).fadeOut(1000 * (i + 1));
    });
};

$.when(Effect()).done(function () { // Do Something });


.az-shadow-1

.az-shadow-2

.az-shadow-3

.az-shadow-4

.az-shadow-5

h1 font-size: 36px

h2 font-size: 32px

h3 font-size: 28px

h4 font-size: 24px

h5 font-size: 20px
h6 font-size: 11px

.az-text-tiny font-size: 12px

.az-text-small font-size: 16px

.az-text-medium font-size: 20px

.az-text-large font-size: 24px

.az-text-xlarge font-size: 28px

.az-text-xxlarge font-size: 32px

.az-text-xxxlarge font-size: 36px

.az-text-xxxxlarge font-size: 40px

.az-text-xxxxxlarge font-size: 44px

.az-text-jumbo font-size: 64px

.az-text-left

.az-text-right

.az-text-center

az-text-justify


Alle våre pakkeløsninger bygger på et abonnementssystem hvor du abonnerer på bruken av et dynamisk publiseringsverktøy, (WordPress) eller en statisk løsning, men eier selv helt og holdent retten til bruken av domenet, e-post og selvsagt det publiserte innholdet. Hos oss møter du ingen skjulte kostnader. Våre pakkeløsninger inneholder alt du trenger for å fremstå profesjonelt på Internett.

.az-text-capitalize

.az-text-uppercase

.az-text-lowercase

.az-text-opacity-75

.az-text-opacity-50

.az-text-opacity-25

Rating 3

.az-image - Automatisk "resize".

.az-circle-10

.az-circle-20

.az-circle-30

.az-circle-40

.az-circle-50