Category : Javascript



How to use collapse example in Bootstrap?

Sometimes to require collapse for display large text with title.Always we like to use collapse for data content. So if you think how to use collapse in my project then it is very easy you have to just copy bellow example and run in your local you will find result. In this example i provide bootstrap collapse example with code so it pretty simple to use. <strong>Example:</strong> <pre class="prettyprint lang-php"> <html lang="en"> <head> <title>Bootstrap collapse example</title> <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" .....

By Hardik Savani | April 27, 2016 | | 2178 Viewer | Category : Javascript
READ MORE

How to add dialog box in bootstrap?

We always need to dialog box in our project because modal is very interesting and specially for GUI. Always we like to use modal for creating data or editing data and also for conformation. So if you think how to set modal in my project then it is very easy you have to just copy bellow example and run in your local you will find result. In this example i provide bootstrap modal example with code so it pretty simple to use. <strong>Example:</strong> <pre class="prettyprint lang-php"> <html lang="en"> <head> <title>Bootstrap modal popup example</title> <link hre.....

By Hardik Savani | April 27, 2016 | | 3514 Viewer | Category : Javascript
READ MORE

Fadein Fadeout example in Jquery

fadein and fadeout is very interesting concept in jquery. fadein and fadeout method through you do hide show without add stylesheet like display none or something. In this example i didn't explain more but i add example for both fadein and fadeout in js. This example is very simple to undestand how to after this you can easily use with image too. So let's see bellow example and use that way: <strong>Example:</strong> <pre class="prettyprint lang-html"> <html lang="en"> <head> <title>Fade In Fade Out Example</title> <script src="http://cdnjs.cloudflare.com/ajax/libs.....

By Hardik Savani | April 20, 2016 | | 2313 Viewer | Category : Javascript
READ MORE

How to get first element of array in Javascript?

Whenever you require to get first element value then you can use bellow example. I give you the way to get first element value in jquery. So let's see following example: <strong>Example</strong> <pre class="prettyprint lang-js"> <script type="text/javascript"> <br/> var languages = ["PHP", ".Net", "Java", "Javascript"]; <br/> var first_element = languages[0]; console.log(first_element); <br/> </script> </pre>

By Hardik Savani | April 18, 2016 | | 5124 Viewer | Category : Javascript
READ MORE

How to get last element of array in Javascript?

Whenever you require to get last element value then you can use bellow example. I give you three way to get last element value in jquery. So let's see following example: <strong>Example</strong> <pre class="prettyprint lang-js"> <script type="text/javascript"> <br/> var languages = ["PHP", ".Net", "Java", "Javascript"]; <br/> var last_element = languages[languages.length-1]; console.log(last_element); <br/> var last_element2 = languages.pop(); console.log(last_element2); <br/> var last_element3 = languages.slice(-1)[0]; console.log(last_element3);.....

By Hardik Savani | April 16, 2016 | | 3819 Viewer | Category : Javascript
READ MORE

How to check image loaded or not in JQuery?

Sometimes we need to detect upto image load successfully, for example you want to do print text instead of image before load image. so you can do that using jquery load and error method. you can see bellow example: <strong>Example:</strong> <pre class="prettyprint lanh-js"> <script type="text/javascript"> $('.image') .load(function(){ console.log("Now loaded correctly"); }) .error(function(){ console.log("Found Error in loading image"); }); </script> </pre>

By Hardik Savani | April 15, 2016 | | 2293 Viewer | Category : Javascript
READ MORE

AngularJS - How to Limit String Length using Filter?

Some case we have enough space to display content, for example you have articale blog and you want to display saveral articale on homepage with limited content like this way : <pre> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate.... </pre> You can do it easily if you are work on any framework or something, but if you want to do on angular then you need to cr.....

By Hardik Savani | April 14, 2016 | | 8003 Viewer | Category : Javascript
READ MORE

JQuery - how to get attribute value example

If you are new and you want to get attribute value then you can get easily. sometime maybe we also need to get custom attribute value, i mean data attribute value. In following example i give you three way to get custom attribute value in jquery. <strong class="example">Example:</strong> <pre class="prettyprint lang-html"> <html lang="en"> <head> <title>Get Custom Attribute Value</title> <script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> </head> <body> <a href="example.com" data-id="1" myname="hd">Ex.....

By Hardik Savani | April 14, 2016 | | 919 Viewer | Category : Javascript
READ MORE

How to Check if Element is Exists or not in jQuery?

Most of the time we require to check specific element is exists or not in javascript. but jquery provide length() method that can help to check element is exists or not. If you are new and want to do this then see bellow example: <strong class="example">Example:</strong> <pre class="prettyprint lang-js"> <script type="text/javascript"> $(document).ready(function(){ if ($('.image').length) { console.log('yes, Image class is exists.'); } else { console.log('sorry, Image class is not exists.'); } }); </script> </pre>

By Hardik Savani | April 13, 2016 | | 1647 Viewer | Category : Javascript
READ MORE

JQuery - Display loading image on ajax call example

Sometimes, we want to display loading image or animation or text when fire every ajax request. In not for only one ajax request, but if you want to load image on every ajax request then you can do that using bellow example. I use ajaxStart() and ajaxComplete() function for show image until All POST or GET Ajax request. this both function will execute one each $.ajax request. <strong class="example">Example:</strong> <pre class="prettyprint lang-js"> <script type="text/javascript"> $(document).ready(function() { $(document).ajaxStart(function(){ $('#process_img').cs.....

By Hardik Savani | April 12, 2016 | | 4751 Viewer | Category : Javascript
READ MORE

    How to install composer using command line in ubuntu ?

    How to install composer using command line in ubuntu ?

    Open Post

    Laravel 5.3 - Create Bootstrap Contact US Form using Form Request

    Laravel 5.3 - Create Bootstrap Contact US Form using Form Request

    Open Post

    Laravel guzzle http client POST request example

    Laravel guzzle http client POST request example

    Open Post

    Paypal payment gateway integration in php source code example

    Paypal payment gateway integration in php source code example

    Open Post

    How to connect mysql database in node js with example?

    How to connect mysql database in node js with example?

    Open Post

    PHP - Getting Started PHPUnit test with simple example

    PHP - Getting Started PHPUnit test with simple example

    Open Post