Showing posts with label jquery. Show all posts
Showing posts with label jquery. Show all posts

Tuesday, July 26, 2016

How to get pins from pinterest with Jquery



If you are familiar with PHP you can just use these existing projects from github

1- Pinterest API - PHP

Read more

To use the Pinterest API you have to register yourself as a developer and create an application. After you've created your app you will receive a app_id and app_secret.


2- Pinterest Bot for PHP

This PHP library will help you to work with your Pinterest account without using any API account credentials.

To have an access to Pinterest API you need to go to developers.pinterest.com and register as a developer, then register your application, then wait for confirmation, and only then you will get an access token. With this library you are already ready to go. Just use only your account login and password, like you do it in your browser. But even your account is not required, if your don't use such operations as creating pins, writing comments or sending messages!

Read more


So, in this case I would not follow the PHP code because it would hard for the beginner. I gonna work with jQuery instead in just a few line of code but the result will produce the landslide victories.

1- Copy the somebody pinterest name or your. ex : https://www.pinterest.com/{nameofsomeone}/
2- Create the function to get the request pins from url
3- Extract the object.

See Example

Tuesday, April 5, 2016

Tuesday, March 22, 2016

7 Cool Clock Tutorials with jQuery

Before you are going to build something, please search for it if it is existed or not. If it were existed, please kindly to try to use it as much as you can to get the existed concepts from the existed things.

Before you are going to build your very own beautiful clock with jQuery + CSS, I would like to show you some tutorials that show you how to build a very cool clock using only jQuery and CSS.

1. HTML clocks using JavaScript and CSS rotation


2. A Colorful Clock With CSS & jQuery



3. CSS3 Digital Clock with jQuery



4. Lwangaman's dynamic jquery clock plugin



5. Old School Clock with CSS3 and jQuery



6. jDigiClock / Digital Clock (HTC Hero inspired)



7. CoolClock - The Javascript Analog Clock



I hope you have learnt something today with TipPHP. If you have any question please leave a comment below, we will try to help you as much as we can.

Thank you for reading our blog.

Monday, March 21, 2016

Change default jQuery Validation




This jQuery plugin makes simple client side form validation easy, whilst still offering plenty of customization options. It makes a good choice if you’re building something new from scratch, but also when you’re trying to integrate something into an existing application with lots of existing markup. The plugin comes bundled with a useful set of validation methods, including URL and email validation, while providing an API to write your own methods. All bundled methods come with default error messages in English and translations into 37 other languages.

So, in this tutorial I will show you how to change the default standard messages of its plugin.

jQuery.extend(jQuery.validator.messages, {
    required: "This field is required.",
    remote: "Please fix this field.",
    email: "Please enter a valid email address.",
    url: "Please enter a valid URL.",
    date: "Please enter a valid date.",
    dateISO: "Please enter a valid date (ISO).",
    number: "Please enter a valid number.",
    digits: "Please enter only digits.",
    creditcard: "Please enter a valid credit card number.",
    equalTo: "Please enter the same value again.",
    accept: "Please enter a value with a valid extension.",
    maxlength: jQuery.validator.format("Please enter no more than {0} characters."),
    minlength: jQuery.validator.format("Please enter at least {0} characters."),
    rangelength: jQuery.validator.format("Please enter a value between {0} and {1} characters long."),
    range: jQuery.validator.format("Please enter a value between {0} and {1}."),
    max: jQuery.validator.format("Please enter a value less than or equal to {0}."),
    min: jQuery.validator.format("Please enter a value greater than or equal to {0}.")
});

Friday, January 22, 2016

Go to position with jQuery



This is just a small trick on how to go to the page section with Jquery by referenced from url. So the concept is not difficult first you need to do is to add the # which will be connected with your link (eg. www.url.com/page#id). After that you can use Jquery window.location.hash to get the "#id" from url. In this code I have used animate function to show the transition while the page is scrolled to the section.



ID


Text Description

$(function() {
        var ha = window.location.hash;
        if(ha) {
            var divLoc = $(ha).offset();
            $('html, body').animate({scrollTop: divLoc.top}, "slow");
        }
    })
 }
}