<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:media="http://search.yahoo.com/mrss/"
>

<channel>
	<title>Various Technical Articles to learn JQuery with easy Examples</title>
	<atom:link href="https://jharaphula.com/category/programming-solutions/learn-jquery-with-examples/feed/" rel="self" type="application/rss+xml" />
	<link>https://jharaphula.com/category/programming-solutions/learn-jquery-with-examples/</link>
	<description>Blog for SEO Guest Posting, Digital Marketing or Home Remedies</description>
	<lastBuildDate>Sat, 05 Jul 2025 12:21:07 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9</generator>
	<item>
		<title>Element, ID and Class Selectors using JQuery with Example</title>
		<link>https://jharaphula.com/types-jquery-selectors-example/</link>
					<comments>https://jharaphula.com/types-jquery-selectors-example/#respond</comments>
		
		<dc:creator><![CDATA[Biswabhusan Panda]]></dc:creator>
		<pubDate>Thu, 29 Dec 2016 15:23:58 +0000</pubDate>
				<category><![CDATA[Learn JQuery with Examples]]></category>
		<category><![CDATA[JQuery Selectors with Example]]></category>
		<category><![CDATA[Selector in CSS3]]></category>
		<category><![CDATA[Types of JQuery Selectors]]></category>
		<category><![CDATA[What is JQuery Selector?]]></category>
		<guid isPermaLink="false">http://jharaphula.com/?p=7085</guid>

					<description><![CDATA[<img width="300" height="188" src="https://jharaphula.com/wp-content/uploads/2016/12/JQuery-Selectors-300x188.jpg" class="webfeedsFeaturedVisual wp-post-image" alt="Element, ID and Class Selectors using JQuery with Example" style="display: block; margin-bottom: 10px; clear: both; max-width: 100%;" decoding="async" fetchpriority="high" srcset="https://jharaphula.com/wp-content/uploads/2016/12/JQuery-Selectors-300x188.jpg 300w, https://jharaphula.com/wp-content/uploads/2016/12/JQuery-Selectors.jpg 610w" sizes="(max-width: 300px) 100vw, 300px" /><p>As you know Jquery is the advanced version of JavaScript. The library we use to implement Jquery is developed using pure JavaScript. Did you remember...</p>
<p>The post <a href="https://jharaphula.com/types-jquery-selectors-example/">Element, ID and Class Selectors using JQuery with Example</a> appeared first on <a href="https://jharaphula.com">OneStop Shop</a>.</p>
]]></description>
										<content:encoded><![CDATA[<img width="300" height="188" src="https://jharaphula.com/wp-content/uploads/2016/12/JQuery-Selectors-300x188.jpg" class="webfeedsFeaturedVisual wp-post-image" alt="Element, ID and Class Selectors using JQuery with Example" style="display: block; margin-bottom: 10px; clear: both; max-width: 100%;" decoding="async" srcset="https://jharaphula.com/wp-content/uploads/2016/12/JQuery-Selectors-300x188.jpg 300w, https://jharaphula.com/wp-content/uploads/2016/12/JQuery-Selectors.jpg 610w" sizes="(max-width: 300px) 100vw, 300px" /><p>As you know Jquery is the advanced version of JavaScript. The library we use to implement Jquery is developed using pure JavaScript. Did you remember those days when Jquery in not <a href="https://jharaphula.com/web-developer-interview-questions-answers/" target="_blank" rel="noopener noreferrer">introduced in Web Technology</a>? During that period to do a Client-Side operation we depend upon JavaScript. Here if I will ask you to select an element from a HTML page using JavaScript, Then I know in replay you will show me those JS methods like GetElementByID or GetElementByName. Yes you are correct using these methods we can select HTML page element for Scripting.</p>
<p>The next generation of JavaScript, Jquery made simple the way to select an element from a HTML page. This technique in Jquery is called “Jquery Selectors”. Jquery Selectors are used to select HTML elements based on their name, id, classes, types, attributes and values of attributes. Looking into the structure of Document Object Model (DOM) Jquery Selectors are categories into 3 types.</p>
<ul>
<li>The element Selector</li>
<li>#ID Selector</li>
<li>.Class Selector</li>
</ul>
<p>Before Jump to discus more about the types of Jquery Selectors first let you know all selectors in Jquery start with a dollar sign followed by parentheses. Like $().</p>
<h3>The element Selector</h3>
<p>Element Selector in Jquery selects elements from a HTML document using the element name. For an example if in your HTML page there are 2 or more paragraphs you want to apply background-color for them, then this Selector is the best option. You can do like the below.</p>
<pre class="brush: jscript; title: ; notranslate">$(document).ready(function(){
$(&quot;button&quot;).click(function(){
$(&quot;p&quot;).css(&quot;background-color&quot;,&quot;yellow&quot;);
});
});</pre>
<h3>#ID Selector</h3>
<p>As you know in a HTML page elements ID is unique for each. During development we use ID to identify an element. The similar concept Jquery uses here. Using Jquery ID Selector you can select any single or unique element from a HTML page. To find an element with a specific ID, write a hash character, followed by the element ID as below.</p>
<pre class="brush: jscript; title: ; notranslate">$(document).ready(function(){
$(&quot;button&quot;).click(function(){
$(&quot;#myDiv&quot;).show();
});
});</pre>
<p>Here myDiv is a Div declared inside the body tag of HTML.</p>
<h3>.Class Selector</h3>
<p>To maintain better look and feel CSS plays an Classical role over HTML. That’s why Class. A CSS Class is nothing but a block of Code which defines various styles for a HTML element. Let’s assume in my HTML page I have 10 div’s which are using same CSS Class. What the Customer wants is all those div’s with same Class name need to Fill red background Color. In such scenario Jquery Class Selectors are useful. To select an element from a HTML document Jquery Class Selector uses the Class name. To find an element with a specific Class, write a dot character, followed by the element CSS Class as below.</p>
<pre class="brush: jscript; title: ; notranslate">$(document).ready(function(){
$(&quot;button&quot;).click(function(){
$(&quot;.myDiv&quot;).hide();
});
});</pre>
<p>Here myDiv is a Div declared inside the body tag of HTML.</p>
<h3>Examples of jQuery Selectors</h3>
<p><strong>$(&#8220;*&#8221;)</strong> &#8211; Used to select all elements of a HTML page.</p>
<p><strong>$(this)</strong> &#8211; Used to select the Current element.</p>
<p><strong>$(&#8220;p.intro&#8221;)</strong> &#8211; Used to select all the paragraphs with Class name intro.</p>
<p><strong>$(&#8220;p:first&#8221;)</strong> &#8211; Used to select only the first paragraph.</p>
<p><strong>$(&#8220;[href]&#8221;)</strong> &#8211; Used to select all elements with an href attribute.</p>
<p><strong>$(&#8220;a[target=&#8217;_blank&#8217;]&#8221;)</strong> &#8211; Used to select all &lt;a&gt; elements with target attribute value equal to &#8220;_blank&#8221;.</p>
<p><strong>$(&#8220;:button&#8221;)</strong> &#8211; Used to select all &lt;button&gt; elements and elements of type=&#8221;button&#8221;.</p>
<p><strong>$(&#8220;tr:even&#8221;)</strong> &#8211; Used to select all even &lt;tr&gt; elements.</p>
<p><strong>$(&#8220;tr:odd&#8221;)</strong> &#8211; Used to select all odd &lt;tr&gt; elements.</p>
<p>The post <a href="https://jharaphula.com/types-jquery-selectors-example/">Element, ID and Class Selectors using JQuery with Example</a> appeared first on <a href="https://jharaphula.com">OneStop Shop</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://jharaphula.com/types-jquery-selectors-example/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			<media:content url="https://jharaphula.com/wp-content/uploads/2016/12/JQuery-Selectors.jpg" medium="image" />
	</item>
		<item>
		<title>Jquery AJAX Example for Load(), Get() and Post() methods</title>
		<link>https://jharaphula.com/jquery-ajax-example/</link>
					<comments>https://jharaphula.com/jquery-ajax-example/#respond</comments>
		
		<dc:creator><![CDATA[Biswabhusan Panda]]></dc:creator>
		<pubDate>Sun, 20 Nov 2016 15:33:58 +0000</pubDate>
				<category><![CDATA[Learn JQuery with Examples]]></category>
		<category><![CDATA[Ajax Example]]></category>
		<category><![CDATA[Function in JQuery]]></category>
		<category><![CDATA[How to implement AJAX?]]></category>
		<category><![CDATA[Jquery Ajax]]></category>
		<category><![CDATA[Jquery AJAX Example]]></category>
		<guid isPermaLink="false">http://jharaphula.com/?p=6688</guid>

					<description><![CDATA[<img width="300" height="188" src="https://jharaphula.com/wp-content/uploads/2016/11/jquery-ajax-example-300x188.jpg" class="webfeedsFeaturedVisual wp-post-image" alt="Jquery AJAX Example for Load(), Get() and Post() methods" style="display: block; margin-bottom: 10px; clear: both; max-width: 100%;" decoding="async" srcset="https://jharaphula.com/wp-content/uploads/2016/11/jquery-ajax-example-300x188.jpg 300w, https://jharaphula.com/wp-content/uploads/2016/11/jquery-ajax-example.jpg 750w" sizes="(max-width: 300px) 100vw, 300px" /><p>AJAX stands for &#8220;Asynchronous JavaScript and XML&#8221;. AJAX technology helps for partial loading. Which improve the performance of a Web page. Example of few AJAX...</p>
<p>The post <a href="https://jharaphula.com/jquery-ajax-example/">Jquery AJAX Example for Load(), Get() and Post() methods</a> appeared first on <a href="https://jharaphula.com">OneStop Shop</a>.</p>
]]></description>
										<content:encoded><![CDATA[<img width="300" height="188" src="https://jharaphula.com/wp-content/uploads/2016/11/jquery-ajax-example-300x188.jpg" class="webfeedsFeaturedVisual wp-post-image" alt="Jquery AJAX Example for Load(), Get() and Post() methods" style="display: block; margin-bottom: 10px; clear: both; max-width: 100%;" decoding="async" loading="lazy" srcset="https://jharaphula.com/wp-content/uploads/2016/11/jquery-ajax-example-300x188.jpg 300w, https://jharaphula.com/wp-content/uploads/2016/11/jquery-ajax-example.jpg 750w" sizes="auto, (max-width: 300px) 100vw, 300px" /><p>AJAX stands for &#8220;Asynchronous JavaScript and XML&#8221;. AJAX technology helps for partial loading. Which <a href="https://jharaphula.com/best-practices-website-speed-performance/" target="_blank" rel="noopener noreferrer">improve the performance of a Web page</a>. Example of few AJAX based web applications are YouTube, Gmail, Google Maps &amp; Facebook tabs. If you are looking to implement AJAX using Jquery then you required to know Jquery inbuilt AJAX methods. Using these methods you can request HTML, JSON, XML &amp; TEXT based Files data from a remote server. In below let us discuss more about the most frequently used jQuery AJAX example using Load(), Get() &amp; Post() methods.</p>
<h2>What is jQuery AJAX?</h2>
<p>jQuery AJAX is a set of methods provided by the jQuery library to perform asynchronous HTTP (Ajax) requests. It abstracts the complexities of raw JavaScript AJAX calls, providing a simpler and more efficient way to interact with web servers. By leveraging jQuery AJAX, developers can fetch, send, and manipulate data without requiring a full page reload, leading to a smoother user experience.</p>
<h2>Key Features of jQuery AJAX</h2>
<p>1. Simplified Syntax – jQuery&#8217;s AJAX methods reduce the amount of code needed compared to vanilla JavaScript. </p>
<p>2. Cross-Browser Compatibility – Handles browser inconsistencies, ensuring consistent behavior across different platforms. </p>
<p>3. Support for Multiple Data Formats – Works with JSON, XML, HTML, and plain text. </p>
<p>4. Event Handling – Provides success, error, and completion callbacks for better control over requests. </p>
<p>5. Asynchronous and Synchronous Requests – Allows both async (default) and sync operations.</p>
<h3>load() Method</h3>
<p>Jquery AJAX Load() method is simple and powerful. It is easy to implement but using this method you can do much complex jobs easier. We use load method to fetch data from server and can bind those data to <a href="https://jharaphula.com/list-of-html5-new-tags/" rel="noopener noreferrer" target="_blank">HTML elements</a>. Syntax for load method is as below.</p>
<p><em>Syntax</em>: $(selector).load(URL,data,callback);</p>
<p>Jquery AJAX load method accepts 3 parameters URL, data &amp; callback. URL is nothing but the physical file path of the file you want to load. Rest 2 parameters are Optional. Data parameter comes with Key &amp; Value pair. It passes through the request as querystring. Callback parameter is the name of a function which you want to execute after the load() method is completed.</p>
<p><strong>Example</strong>:</p>
<pre class="brush: xml; title: ; notranslate">$(&quot;#div&quot;).load(&quot;employee_details.txt&quot;);</pre>
<p><strong>employee_details.txt</strong></p>
<pre class="brush: xml; title: ; notranslate">&lt;h2&gt;AJAX using Jquery&lt;/h2&gt;
&lt;p id=&quot;paragraph&quot;&gt;This is sample text in a paragraph.&lt;/p&gt;</pre>
<h3>$.get() Method</h3>
<p>As you know in client server architecture we use Get method to fetch data from the server. In Jquery $.get() method we use with HTTP GET request. Syntax for Jquery Get method is as below.</p>
<p><em>Syntax</em>: $.get(URL,callback);</p>
<p>Jquery $.get() method accepts 2 parameters URL &amp; Callback. URL is the file path from which you want to read the data. Callback is the parameter of a function name which you want to execute after the sucessful Call.</p>
<p><strong>Example</strong>:</p>
<pre class="brush: jscript; title: ; notranslate">$(&quot;button&quot;).click(function(){
$.get(&quot;employee_details.asp&quot;, function(data, status) {
alert(&quot;Records: &quot; + data + &quot;\nStatus: &quot; + status);
});
});</pre>
<p><strong>employee_details.asp</strong></p>
<pre class="brush: php; title: ; notranslate">&lt;%
response.write(&quot;This is some text from an external ASP file.&quot;)
%&gt;</pre>
<h3>$.post() Method</h3>
<p>Like Get method Post is one more useful method of Client Server architecture. Using Post method we send data to Server from Client. Syntax for Post method is as below.</p>
<p><em>Syntax</em>: $.post(URL,data,callback);</p>
<p>Jquery $.post() method accepts 3 parameters URL, Data &amp; Callback. URL is the server file to which file you want to post data from Client end. Rest 2 parameters are optional. Using data parameter you can send any data in key value pair while sending request to the server. The optional callback parameter is the name of a function to be executed if the request succeeds.</p>
<p><strong>Example</strong>:</p>
<pre class="brush: jscript; title: ; notranslate">$(&quot;button&quot;).click(function(){
$.post(&quot;sample_post.asp&quot;,
{
empname: &quot;Raghav&quot;,
city: &quot;Washigton DC&quot;
},
function(data, status){
alert(&quot;Records: &quot; + data + &quot;\nStatus: &quot; + status);
});
});</pre>
<p><strong>sample_post.asp</strong></p>
<pre class="brush: vb; title: ; notranslate">&lt;%
dim f_name, city
f_name = Request.Form(&quot;empname &quot;)
city = Request.Form(&quot;city&quot;)
Response.Write(&quot;Dear &quot; &amp; f_name &amp; &quot;. &quot;)
Response.Write(&quot;Hope you live well in &quot; &amp; city &amp; &quot;.&quot;)
%&gt;</pre>
<h2>Common Use Cases of jQuery AJAX</h2>
<p>1. Form Submission Without Page Reload &#8211; Submit form data asynchronously and display a success/error message.</p>
<p>2. Dynamic Content Loading &#8211; Load partial HTML or data from a server on demand.</p>
<p>3. Autocomplete Suggestions &#8211; Fetch suggestions from a server as the user types.</p>
<p>4. Real-Time Data Updates &#8211; Poll the server periodically for new data (e.g., notifications).</p>
<p>5. API Integration &#8211; Communicate with RESTful APIs to fetch or modify data.</p>
<h2>Best Practices for jQuery AJAX</h2>
<p>1. Use HTTPS for Security – Always prefer secure connections to prevent data breaches. </p>
<p>2. Validate Input and Output – Sanitize data to avoid security vulnerabilities. </p>
<p>3. Handle Errors Gracefully – Provide user feedback if a request fails. </p>
<p>4. Optimize Performance – Minimize unnecessary requests and cache data when possible. </p>
<p>5. Use Asynchronous Mode – Avoid synchronous requests as they block the UI.</p>
<h2>Limitations of jQuery AJAX</h2>
<p>&#8211; Dependence on jQuery – Requires the jQuery library, increasing page load time.<br />
&#8211; Not a Replacement for Modern APIs – Fetch API and Axios offer more modern alternatives.<br />
&#8211; Limited to HTTP/HTTPS – Cannot handle WebSocket or other protocols.</p>
<h2>Conclusion</h2>
<p>jQuery AJAX simplifies asynchronous web communication, making it an essential tool for developers building dynamic web applications. By understanding its methods, handling responses effectively, and following best practices, developers can create seamless, interactive experiences.</p>
<p>The post <a href="https://jharaphula.com/jquery-ajax-example/">Jquery AJAX Example for Load(), Get() and Post() methods</a> appeared first on <a href="https://jharaphula.com">OneStop Shop</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://jharaphula.com/jquery-ajax-example/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			<media:content url="https://jharaphula.com/wp-content/uploads/2016/11/jquery-ajax-example.jpg" medium="image" />
	</item>
		<item>
		<title>Example of Simple Responsive Jquery Range Slider using Jquery UI</title>
		<link>https://jharaphula.com/simple-responsive-jquery-range-slider/</link>
					<comments>https://jharaphula.com/simple-responsive-jquery-range-slider/#respond</comments>
		
		<dc:creator><![CDATA[Biswabhusan Panda]]></dc:creator>
		<pubDate>Wed, 27 Jul 2016 17:04:19 +0000</pubDate>
				<category><![CDATA[Learn JQuery with Examples]]></category>
		<category><![CDATA[Jquery range Slider]]></category>
		<category><![CDATA[JQuery Slideshow]]></category>
		<category><![CDATA[Jquery UI]]></category>
		<category><![CDATA[Responsive Design]]></category>
		<category><![CDATA[Slider using Jquery UI]]></category>
		<guid isPermaLink="false">http://jharaphula.com/?p=4330</guid>

					<description><![CDATA[<img width="300" height="180" src="https://jharaphula.com/wp-content/uploads/2016/07/Range-300x180.png" class="webfeedsFeaturedVisual wp-post-image" alt="Example of simple responsive Jquery range Slider using Jquery UI" style="display: block; margin-bottom: 10px; clear: both; max-width: 100%;" decoding="async" loading="lazy" srcset="https://jharaphula.com/wp-content/uploads/2016/07/Range-300x180.png 300w, https://jharaphula.com/wp-content/uploads/2016/07/Range.png 889w" sizes="auto, (max-width: 300px) 100vw, 300px" /><p>Generally we use range slider during we decide a specific range of value to input the system. For an example in a shopping cart application...</p>
<p>The post <a href="https://jharaphula.com/simple-responsive-jquery-range-slider/">Example of Simple Responsive Jquery Range Slider using Jquery UI</a> appeared first on <a href="https://jharaphula.com">OneStop Shop</a>.</p>
]]></description>
										<content:encoded><![CDATA[<img width="300" height="180" src="https://jharaphula.com/wp-content/uploads/2016/07/Range-300x180.png" class="webfeedsFeaturedVisual wp-post-image" alt="Example of simple responsive Jquery range Slider using Jquery UI" style="display: block; margin-bottom: 10px; clear: both; max-width: 100%;" decoding="async" loading="lazy" srcset="https://jharaphula.com/wp-content/uploads/2016/07/Range-300x180.png 300w, https://jharaphula.com/wp-content/uploads/2016/07/Range.png 889w" sizes="auto, (max-width: 300px) 100vw, 300px" /><p>Generally we use range slider during we decide a specific range of value to input the system. For an example in a shopping cart application if you want to find out all dress materials with in your budget ($100 to $300) in such case range slider is very useful. To develop a responsive range slider from scratch is a time consuming job. Looking into this Jquery UI provides in-built Jquery range slider. It&#8217;s very easy and less time consuming <a href="https://jharaphula.com/job-professional-network-linkedin/" target="_blank" rel="noopener noreferrer">job</a> to implement in your application.</p>
<p>Look at the demo app below. Here in my HTML page I have 2 div&#8217;s. One is displaying range slider selected values while other one is responsible for Jquery UI slider. To integrate Jquery UI in the below app I referred Jquery library, Jquery UI CSS &amp; Jquery UI CDN links.</p>
<h2>To implement range Slider</h2>
<p>To implement range Slider I am applying Jquery UI in-built slider method to the div with id rangeSlider. To Configure my range Slider according to my inputs here I passed various parameters such as range, min, max &amp; values. By declaring range: true I am telling Jquery UI slider to provide me a range based Control. Using min &amp; max I am assigning the minimum and maximum value for the range Slider. Values are nothing but the initial range. Here my slider is showing range from 100 to 600 dollars. Initial during after page load by setting values to 200 to 400 I am showing the slider range in-between 200 to 400 dollars. For more API functions like Orientation or Slide you can refer <a href="http://api.jqueryui.com/slider/" target="_blank" rel="noopener noreferrer nofollow">http://api.jqueryui.com/slider/</a>.</p>
<p>This Jquery range slider is designed by Jquery UI. It is completely browser compatible and supports all modern browsers. Even you don&#8217;t need to worry about it&#8217;s responsiveness. Independent of all devices this range slider works fine. To the run the below app just copy the codes to a notepad file. Save it as a html file &amp; open in your browser. As in the below app we are referring CDN links make sure while running the app you are with internet connectivity.</p>
<h3>Example.htm</h3>
<pre class="brush: xml; title: ; notranslate">&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Responsive Jquery range slider&lt;/title&gt;
&lt;link rel=&quot;stylesheet&quot; href=&quot;https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.0/jquery-ui.css&quot;&gt;
&lt;script src=&quot;https://code.jquery.com/jquery-3.1.0.min.js&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;https://code.jquery.com/ui/1.11.4/jquery-ui.min.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
$(document).ready(function() {
$(&quot;#rangeSlider&quot;).slider ({
range: true,
min: 100,
max: 600,
values: [200, 400],
slide: function(event, ui) {
$(&quot;#priceRange&quot;).html(&quot;$&quot; + ui.values[0] + &quot; - $&quot; + ui.values[1]);
$(&quot;#minimumPrice&quot;).val(ui.values[0]);
$(&quot;#maximumPrice&quot;).val(ui.values[1]);
}
});
/* In real-time updating the value of range Slider to Span */
$(&quot;#priceRange&quot;).html(&quot;$&quot; + $(&quot;#rangeSlider&quot;).slider(&quot;values&quot;, 0) + &quot; - $&quot; + $(&quot;#rangeSlider&quot;).slider(&quot;values&quot;, 1));
});
&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div&gt;Selected Range: &lt;span id=&quot;priceRange&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div id=&quot;rangeSlider&quot;&gt;&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
<h2>jQuery Range Slider Using jQuery UI</h2>
<p>Range sliders are essential UI components that allow users to select a value or range of values within a specified minimum and maximum limit. They enhance user interaction by providing a visual and intuitive way to input data. jQuery UI, a popular library built on top of jQuery, provides a simple yet powerful way to implement range sliders with minimal coding.</p>
<h2>Understanding jQuery UI Slider</h2>
<p>The jQuery UI Slider widget converts a standard HTML element into an interactive slider. It supports single handles for selecting a single value or multiple handles for defining a range. The slider can be customized in terms of appearance, behavior, and functionality, making it suitable for various applications such as price filters, volume controls, and data visualization.</p>
<h2>Key Features of jQuery UI Slider</h2>
<p>1. Customizable Range – Define minimum and maximum values.<br />
2. Single or Dual Handles – Choose between a single slider or a range slider.<br />
3. Step Increments – Set predefined intervals for slider movement.<br />
4. Smooth Animation – Enable or disable sliding animation.<br />
5. Event Handling – Respond to user interactions like sliding, start, and stop.<br />
6. Theming – Apply jQuery UI’s built-in themes or custom CSS.</p>
<h2>Best Practices</h2>
<p>1. <strong>Accessibility</strong> – Ensure keyboard navigation and ARIA attributes for screen readers.<br />
2. <strong>Responsive Design</strong> – Adjust slider dimensions for different screen sizes.<br />
3. <strong>Performance Optimization</strong> – Avoid heavy computations in event handlers.<br />
4. <strong>Fallback Mechanism</strong> – Provide an alternative input method for non-JavaScript users.</p>
<h2>Conclusion</h2>
<p>The jQuery UI range slider is a flexible and user-friendly component that enhances web applications by providing an intuitive way to select values. With its extensive customization options and ease of implementation, it remains a preferred choice for developers. By following best practices and leveraging advanced features, you can create interactive sliders that improve user experience across various use cases. The ability to integrate smoothly with existing JavaScript code makes it a valuable tool in modern web development.</p>
<p>The post <a href="https://jharaphula.com/simple-responsive-jquery-range-slider/">Example of Simple Responsive Jquery Range Slider using Jquery UI</a> appeared first on <a href="https://jharaphula.com">OneStop Shop</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://jharaphula.com/simple-responsive-jquery-range-slider/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			<media:content url="https://jharaphula.com/wp-content/uploads/2016/07/Range.png" medium="image" />
	</item>
		<item>
		<title>Simple responsive Jquery image Slider without using any plugin</title>
		<link>https://jharaphula.com/simple-responsive-jquery-image-slider/</link>
					<comments>https://jharaphula.com/simple-responsive-jquery-image-slider/#respond</comments>
		
		<dc:creator><![CDATA[Biswabhusan Panda]]></dc:creator>
		<pubDate>Mon, 04 Jul 2016 15:44:38 +0000</pubDate>
				<category><![CDATA[Learn JQuery with Examples]]></category>
		<category><![CDATA[Bootstrap image Gallery]]></category>
		<category><![CDATA[CSS Sprite images]]></category>
		<category><![CDATA[Jquery Carousel Slider]]></category>
		<category><![CDATA[Jquery image Slider]]></category>
		<category><![CDATA[Jquery range Slider]]></category>
		<guid isPermaLink="false">http://jharaphula.com/?p=4102</guid>

					<description><![CDATA[<img width="300" height="189" src="https://jharaphula.com/wp-content/uploads/2016/07/easily-cofigurable-jquery-slider-300x189.png" class="webfeedsFeaturedVisual wp-post-image" alt="Simple responsive Jquery image Slider without using plugin" style="display: block; margin-bottom: 10px; clear: both; max-width: 100%;" decoding="async" loading="lazy" srcset="https://jharaphula.com/wp-content/uploads/2016/07/easily-cofigurable-jquery-slider-300x189.png 300w, https://jharaphula.com/wp-content/uploads/2016/07/easily-cofigurable-jquery-slider.png 849w" sizes="auto, (max-width: 300px) 100vw, 300px" /><p>To display multiple images under a specific area generally we use controls like Carousel or Slider. It was noticed these Control majorly appears in main...</p>
<p>The post <a href="https://jharaphula.com/simple-responsive-jquery-image-slider/">Simple responsive Jquery image Slider without using any plugin</a> appeared first on <a href="https://jharaphula.com">OneStop Shop</a>.</p>
]]></description>
										<content:encoded><![CDATA[<img width="300" height="189" src="https://jharaphula.com/wp-content/uploads/2016/07/easily-cofigurable-jquery-slider-300x189.png" class="webfeedsFeaturedVisual wp-post-image" alt="Simple responsive Jquery image Slider without using plugin" style="display: block; margin-bottom: 10px; clear: both; max-width: 100%;" decoding="async" loading="lazy" srcset="https://jharaphula.com/wp-content/uploads/2016/07/easily-cofigurable-jquery-slider-300x189.png 300w, https://jharaphula.com/wp-content/uploads/2016/07/easily-cofigurable-jquery-slider.png 849w" sizes="auto, (max-width: 300px) 100vw, 300px" /><p>To display multiple images under a specific area generally we use controls like Carousel or Slider. It was noticed these Control majorly appears in main page. Here in the below app I am creating an easily configurable jQuery image Slider. To show you the demo here I am with 3 files index.htm, slider.js and main.css. Slider.js and main.css embedded in index.htm file. By simply copying the below files you can create your own free Jquery Slider.</p>
<p>The logic I implemented here is so simple. In my HTML page I have 2 div&#8217;s. One is for slider images and the other one I am using for Auto Slide Show. In my first div I have a ul element. Under this in each li I am loading images using simple image tag from HTML. To customize my Jquery image slider better here I added 2 anchor tags for next and previous actions.</p>
<p>To <a href="https://jharaphula.com/best-home-remedies-for-glowing-skin/" target="_blank" rel="noopener noreferrer">maintain a healthy look</a> and feel I have few CSS classes in style.css file. As it is a simple jquery slider the main logic is inside the js file. In js file I am with 4 variables. IndivisualSlideWidth and IndivisualSlideHeight are storing li width and height. NumberOfSlides storing total number of images I want to show in Slider. In TotalWidthOfAllSlides I am calculating and storing the total width of UL element. During slide show I am hiding the total length and showing each slide independently. After this in my js file I have 2 functions moveSlideLeft() and moveSlideRight(). These function are responsible for slides movement. To configure auto slider option under on change event of autoOptionCheckbox I am calling the moveSlideRight() function. Here for interval between each slide I declared 5000 milliseconds.</p>
<h2>Jquery image Slider Sample Code</h2>
<h2>jquery-slider.htm</h2>
<pre class="brush: xml; title: ; notranslate">&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Simple JQuery image Slider&lt;/title&gt;
&lt;!--JQuery CDN Link--&gt;
&lt;script src=&quot;https://code.jquery.com/jquery-3.0.0.min.js&quot;&gt;&lt;/script&gt;
&lt;!--Applying Styles to the Page--&gt;
&lt;link rel=&quot;stylesheet&quot; href=&quot;main.css&quot;&gt;
&lt;script src=&quot;slider.js&quot;&gt;&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h2&gt;JQuery image Slider&lt;/h2&gt;
&lt;div id=&quot;jq_slider&quot;&gt;
&lt;a href=&quot;#&quot; class=&quot;go_next&quot;&gt;&gt;&gt;&lt;/a&gt;
&lt;a href=&quot;#&quot; class=&quot;go_prev&quot;&gt;&lt;&lt;&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;img src=&quot;Slide-A.jpg&quot; alt=&quot;Katrina Kaif HD Still&quot; title=&quot;Katrina Kaif HD Still&quot; /&gt;&lt;/li&gt;
&lt;li&gt;&lt;img src=&quot;Slide-B.jpg&quot; alt=&quot;Priyanka Chopra HD Still&quot; title=&quot;Priyanka Chopra HD Still&quot; /&gt;&lt;/li&gt;
&lt;li&gt;&lt;img src=&quot;Slide-C.jpg&quot; alt=&quot;Deepika Paducon HD Still&quot; title=&quot;Deepika Paducon HD Still&quot; /&gt;&lt;/li&gt;
&lt;li&gt;&lt;img src=&quot;Slide-D.jpg&quot; alt=&quot;Sonakshi Sinha HD Still&quot; title=&quot;Sonakshi Sinha HD Still&quot; /&gt;&lt;/li&gt;
&lt;/ul&gt;  
&lt;/div&gt;
&lt;div class=&quot;auto_slider&quot;&gt;
&lt;input type=&quot;checkbox&quot; id=&quot;autoOptionCheckbox&quot;&gt;
&lt;label for=&quot;checkbox&quot;&gt;Auto Slider Option&lt;/label&gt;
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
<h2>slider.js</h2>
<pre class="brush: jscript; title: ; notranslate">$(document).ready(function () {

/* The below two variables are defined for width and height of Slides */
var IndivisualSlideWidth = $('#jq_slider ul li').width();
var IndivisualSlideHeight = $('#jq_slider ul li').height();

/* The auto Slider Function */
$('#autoOptionCheckbox').change(function(){
/* Defining time in milliseconds for auto Slider option */
setInterval(function () {
/* Calling the Function to rotate Slides */
moveSlideRight();
}, 5000);
});

/* Counting the Number of Slides */
var NumberOfSlides = $('#jq_slider ul li').length;

/* Calculating all Slides width for UL element */
var TotalWidthOfAllSlides = NumberOfSlides * IndivisualSlideWidth;

/* Setting width and height for main div */
$('#jq_slider').css({ width: IndivisualSlideWidth, height: IndivisualSlideHeight });

$('#jq_slider ul').css({ width: TotalWidthOfAllSlides, marginLeft: - IndivisualSlideWidth });
$('#jq_slider ul li:last-child').prependTo('#jq_slider ul');

/* This Function is responsible for moving Slide to left */
function moveSlideLeft() {
$('#jq_slider ul').animate({
left: + IndivisualSlideWidth
}, 300, function () {
$('#jq_slider ul li:last-child').prependTo('#jq_slider ul');
$('#jq_slider ul').css('left', '');
});
};

/* This Function is responsible for moving Slide to right */
function moveSlideRight() {
$('#jq_slider ul').animate({
left: - IndivisualSlideWidth
}, 300, function () {
$('#jq_slider ul li:first-child').appendTo('#jq_slider ul');
$('#jq_slider ul').css('left', '');
});
};

/* Handling previous Click Funtionality */
$('a.go_prev').click(function () {
moveSlideLeft();
});

/* Handling next Click Funtionality */
$('a.go_next').click(function () {
moveSlideRight();
});
});</pre>
<h2>main.css</h2>
<p>Using CSS style here I am applying style to my slider ul li elements plus adding hover effects.</p>
<pre class="brush: css; title: ; notranslate">html, body { margin: 0; padding: 0; font-family: 'Verdana'; background: #c8fcff; color: #000; }
h2 { text-align: center; }

#jq_slider { position: relative; overflow: hidden; border-radius: 6px; margin: 20px auto 0 auto; }

#jq_slider ul { position: relative; margin: 0; padding: 0; list-style: none; }
#jq_slider ul li { position: relative; display: block; width: 700px; height: 350px; text-align: center; float: left; margin: 0; padding: 0; }

a.go_prev, a.go_next { position: absolute; z-index: 999; top: 40%; display: block; padding: 4% 3%; width: auto; height: auto; background: #2a2a2a; color: #FFF; text-decoration: none; opacity: 0.7; cursor: pointer; font-weight: normal; font-size: 16px; }
a.go_prev:hover, a.go_next:hover { opacity: 0.9; -webkit-transition: all 0.2s ease; }
a.go_prev { border-radius: 0 3px 3px 0; }
a.go_next { border-radius: 3px 0 0 3px; right: 0; }

.auto_slider { margin: 10px auto; position: relative; font-size: 16px; width: 180px; }</pre>
<h2>Images for Jquery Slider</h2>
<p>The following 4 images are used in the above demo app. You can download and try.</p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-4107" src="https://jharaphula.com/wp-content/uploads/2016/07/Slide-A.jpg" alt="Slide-A" width="700" height="350" srcset="https://jharaphula.com/wp-content/uploads/2016/07/Slide-A.jpg 700w, https://jharaphula.com/wp-content/uploads/2016/07/Slide-A-300x150.jpg 300w" sizes="auto, (max-width: 700px) 100vw, 700px" /><em>Slide-A.jpg</em></p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-4108" src="https://jharaphula.com/wp-content/uploads/2016/07/Slide-B.jpg" alt="Slide-B" width="700" height="350" srcset="https://jharaphula.com/wp-content/uploads/2016/07/Slide-B.jpg 700w, https://jharaphula.com/wp-content/uploads/2016/07/Slide-B-300x150.jpg 300w" sizes="auto, (max-width: 700px) 100vw, 700px" /><em>Slide-B.jpg</em></p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-4109" src="https://jharaphula.com/wp-content/uploads/2016/07/Slide-C.jpg" alt="Slide-C" width="700" height="350" srcset="https://jharaphula.com/wp-content/uploads/2016/07/Slide-C.jpg 700w, https://jharaphula.com/wp-content/uploads/2016/07/Slide-C-300x150.jpg 300w" sizes="auto, (max-width: 700px) 100vw, 700px" /><em>Slide-C.jpg</em></p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-4110" src="https://jharaphula.com/wp-content/uploads/2016/07/Slide-D.jpg" alt="Slide-D" width="700" height="350" srcset="https://jharaphula.com/wp-content/uploads/2016/07/Slide-D.jpg 700w, https://jharaphula.com/wp-content/uploads/2016/07/Slide-D-300x150.jpg 300w" sizes="auto, (max-width: 700px) 100vw, 700px" /><em>Slide-D.jpg</em></p>
<p>The post <a href="https://jharaphula.com/simple-responsive-jquery-image-slider/">Simple responsive Jquery image Slider without using any plugin</a> appeared first on <a href="https://jharaphula.com">OneStop Shop</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://jharaphula.com/simple-responsive-jquery-image-slider/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			<media:content url="https://jharaphula.com/wp-content/uploads/2016/07/easily-cofigurable-jquery-slider.png" medium="image" />
	</item>
		<item>
		<title>Convert HEX to RGB &#038; RGB to HEX Converter Jquery Functions</title>
		<link>https://jharaphula.com/convert-hex-rgb-converter-jquery/</link>
					<comments>https://jharaphula.com/convert-hex-rgb-converter-jquery/#respond</comments>
		
		<dc:creator><![CDATA[Nibedita Panda]]></dc:creator>
		<pubDate>Sun, 15 May 2016 17:09:12 +0000</pubDate>
				<category><![CDATA[Learn JQuery with Examples]]></category>
		<category><![CDATA[Convert HEX to RGB]]></category>
		<category><![CDATA[Converter Jquery Functions]]></category>
		<category><![CDATA[Jquery Functions]]></category>
		<category><![CDATA[JQuery String Functions]]></category>
		<category><![CDATA[RGB to HEX Converter]]></category>
		<guid isPermaLink="false">http://box.jharaphula.com/?p=1642</guid>

					<description><![CDATA[<img width="300" height="180" src="https://jharaphula.com/wp-content/uploads/2016/05/rgb-to-hex-jquery-function-300x180.jpg" class="webfeedsFeaturedVisual wp-post-image" alt="Convert HEX to RGB &amp; RGB to HEX converter Jquery Functions" style="display: block; margin-bottom: 10px; clear: both; max-width: 100%;" decoding="async" loading="lazy" srcset="https://jharaphula.com/wp-content/uploads/2016/05/rgb-to-hex-jquery-function-300x180.jpg 300w, https://jharaphula.com/wp-content/uploads/2016/05/rgb-to-hex-jquery-function.jpg 762w" sizes="auto, (max-width: 300px) 100vw, 300px" /><p>Whether in Web or Desktop application during we design a Color Picker we required Color Converter functions. Basically in the world of web we use...</p>
<p>The post <a href="https://jharaphula.com/convert-hex-rgb-converter-jquery/">Convert HEX to RGB &#038; RGB to HEX Converter Jquery Functions</a> appeared first on <a href="https://jharaphula.com">OneStop Shop</a>.</p>
]]></description>
										<content:encoded><![CDATA[<img width="300" height="180" src="https://jharaphula.com/wp-content/uploads/2016/05/rgb-to-hex-jquery-function-300x180.jpg" class="webfeedsFeaturedVisual wp-post-image" alt="Convert HEX to RGB &amp; RGB to HEX converter Jquery Functions" style="display: block; margin-bottom: 10px; clear: both; max-width: 100%;" decoding="async" loading="lazy" srcset="https://jharaphula.com/wp-content/uploads/2016/05/rgb-to-hex-jquery-function-300x180.jpg 300w, https://jharaphula.com/wp-content/uploads/2016/05/rgb-to-hex-jquery-function.jpg 762w" sizes="auto, (max-width: 300px) 100vw, 300px" /><p>Whether in Web or Desktop application during we design a Color Picker we required Color Converter <a href="https://jharaphula.com/jquery-string-functions/" rel="noopener noreferrer" target="_blank">functions</a>. Basically in the world of web we use 2 types of Color Codes. They are RGB and Hexadecimal (HEX). In this demo for your reference let us share &#8220;Convert HEX to RGB&#8221; &#038; &#8220;RGB to HEX Converter&#8221; Jquery Functions.</p>
<h3>RGB</h3>
<p>RGB Color model stands for Red, Green and Blue Colors. Generally if you will watch the back view of a Color TV there you can saw 3 rays from CRT. Which hits phosphors or dyes to display the Colors. In RGB color model 0 intensity gives the most darkest color &#038; full intensity presents white. To generate colors like Yellow we controls intensity of 3 rays (RGB). Type of RGB Devices are TV, Computer, Video Cameras or Scanners.</p>
<h3>Hexadecimal (HEX)</h3>
<p>Hexadecimal Color Code is also Called base 16 or HEX. Hexadecimal uses 0 to 9 integer or A to F Character values. While writing a Hexadecimal Color code we start with #. Example of Hexadecimal Color Code for White Color is #FFFFFF. It can be present in another way #FFF. Hexadecimal commonly used to represent Computer memory.</p>
<p>Look at the below examples. Here I created 2 JQuery functions &#8220;RGB to HEX&#8221; and &#8220;HEX to RGB&#8221;. Inside the function RGB to HEX I am using regular expression.</p>
<h3>RGB to HEX Converter Jquery Function</h3>
<pre class="brush: jscript; title: ; notranslate">
/* RGB to HEX using Regular Expression */
function rgbToHexadecimal(rgb_color){
rgb_color = rgb_color.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i);
return (rgb_color &amp;&amp; rgb_color.length === 4) ? &quot;#&quot; +
(&quot;0&quot; + parseInt(rgb_color[1],10).toString(16)).slice(-2) +
(&quot;0&quot; + parseInt(rgb_color[2],10).toString(16)).slice(-2) +
(&quot;0&quot; + parseInt(rgb_color[3],10).toString(16)).slice(-2) : '';
}
</pre>
<h3>Convert HEX to RGB Jquery Function</h3>
<pre class="brush: jscript; title: ; notranslate">
function hexadecimalToRGB(hex_color)
{
var red_color = parseInt((onlyHex(hex_color)).substring(0,2),16), green_color = ((onlyHex(hex_color)).substring(2,4),16), blue_color = parseInt((onlyHex(hex_color)).substring(4,6),16)
return red_color + ',' + green_color + ',' + blue_color;
}

/* Supporting Function */
function onlyHex(hex_color) {return (hex_color.charAt(0)==&quot;#&quot;) ? hex_color.substring(1,7):hex_color}
</pre>
<p>The post <a href="https://jharaphula.com/convert-hex-rgb-converter-jquery/">Convert HEX to RGB &#038; RGB to HEX Converter Jquery Functions</a> appeared first on <a href="https://jharaphula.com">OneStop Shop</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://jharaphula.com/convert-hex-rgb-converter-jquery/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			<media:content url="https://jharaphula.com/wp-content/uploads/2016/05/rgb-to-hex-jquery-function.jpg" medium="image" />
	</item>
		<item>
		<title>JQuery String Functions (Replace, Substr, IndexOf, lastIndexOf, Substring, &#8230;)</title>
		<link>https://jharaphula.com/jquery-string-functions/</link>
					<comments>https://jharaphula.com/jquery-string-functions/#comments</comments>
		
		<dc:creator><![CDATA[Nibedita Panda]]></dc:creator>
		<pubDate>Sun, 15 May 2016 08:04:48 +0000</pubDate>
				<category><![CDATA[Learn JQuery with Examples]]></category>
		<category><![CDATA[Function in JQuery]]></category>
		<category><![CDATA[IndexOf]]></category>
		<category><![CDATA[JQuery String Functions]]></category>
		<category><![CDATA[lastIndexOf]]></category>
		<category><![CDATA[Substr]]></category>
		<category><![CDATA[toUpperCase]]></category>
		<guid isPermaLink="false">http://box.jharaphula.com/?p=1359</guid>

					<description><![CDATA[<img width="300" height="198" src="https://jharaphula.com/wp-content/uploads/2016/05/jquery-300x198.jpg" class="webfeedsFeaturedVisual wp-post-image" alt="JQuery String Functions (Replace, Substr, IndexOf, lastIndexOf, Substring, ...)" style="display: block; margin-bottom: 10px; clear: both; max-width: 100%;" decoding="async" loading="lazy" srcset="https://jharaphula.com/wp-content/uploads/2016/05/jquery-300x198.jpg 300w, https://jharaphula.com/wp-content/uploads/2016/05/jquery-1024x677.jpg 1024w, https://jharaphula.com/wp-content/uploads/2016/05/jquery-182x120.jpg 182w, https://jharaphula.com/wp-content/uploads/2016/05/jquery-106x70.jpg 106w, https://jharaphula.com/wp-content/uploads/2016/05/jquery.jpg 1280w" sizes="auto, (max-width: 300px) 100vw, 300px" /><p>Strings are a fundamental data type in programming, and manipulating them efficiently is crucial for web development. jQuery, a fast and concise JavaScript library, simplifies...</p>
<p>The post <a href="https://jharaphula.com/jquery-string-functions/">JQuery String Functions (Replace, Substr, IndexOf, lastIndexOf, Substring, &#8230;)</a> appeared first on <a href="https://jharaphula.com">OneStop Shop</a>.</p>
]]></description>
										<content:encoded><![CDATA[<img width="300" height="198" src="https://jharaphula.com/wp-content/uploads/2016/05/jquery-300x198.jpg" class="webfeedsFeaturedVisual wp-post-image" alt="JQuery String Functions (Replace, Substr, IndexOf, lastIndexOf, Substring, ...)" style="display: block; margin-bottom: 10px; clear: both; max-width: 100%;" decoding="async" loading="lazy" srcset="https://jharaphula.com/wp-content/uploads/2016/05/jquery-300x198.jpg 300w, https://jharaphula.com/wp-content/uploads/2016/05/jquery-1024x677.jpg 1024w, https://jharaphula.com/wp-content/uploads/2016/05/jquery-182x120.jpg 182w, https://jharaphula.com/wp-content/uploads/2016/05/jquery-106x70.jpg 106w, https://jharaphula.com/wp-content/uploads/2016/05/jquery.jpg 1280w" sizes="auto, (max-width: 300px) 100vw, 300px" /><p>Strings are a fundamental data type in programming, and manipulating them efficiently is crucial for web development. jQuery, a fast and concise JavaScript library, simplifies string operations by providing built-in methods and utilities. While jQuery itself does not introduce new string functions, it leverages JavaScript’s native string methods and enhances DOM manipulation, making string handling more intuitive. This article explores common string operations in jQuery, their applications, and best practices.</p>
<p>I remember those day when I am a fresher to programming. To complete my assignments related to string operations I always take help from Google. Sometime to find out a Syntax or Sometime for an Examples. In my view string operations are little bit confusing to freshers. During programming there are several possibilities to do with a string. Some of them are String Concatenation, Finding the position of a Character in a String, Split or retrieve few part of the String.</p>
<p>Let me explain a senario here where you need string operation. Assume from your database you are fetching product descriptions for each products in a HTML page. During this you don&#8217;t want to show whole the product description texts. As per the customer you need to show first 40 charecters from product description string. In this case you need to go for string operations using string functions like substr or substring to extract a part of the string.</p>
<h2>List of JQuery String Functions</h2>
<p>In this session for <a href="https://jharaphula.com/top-jquery-interview-questions-with-answers/" target="_blank" rel="noopener noreferrer">beginner of Jquery</a> to make their journey easier I am explaining all the Jquery String Functions in details. The programming language I used here is Jquery. But keep remember theoretically fundamentals of String Operations are same for all languages. In implementation only Syntax&#8217;s are differ.</p>
<h2>charAt(n)</h2>
<p>In a String array to know the Character of a specific index we use charAt() function. Let&#8217;s take an example you have a string &#8220;THIS IS A TABLE.&#8221;. In this String if I want to know the Character of index 3 charAt() function can did that. Look the example below.</p>
<pre class="brush: jscript; title: ; notranslate">var myStr = &quot;THIS IS A TABLE.&quot;;
var ch = myStr.charAt(3);</pre>
<p><em>Output will be</em> : S</p>
<p>charAt() function accepts integer value as the param &amp; returns String Character. charAt(n) calculates index starting from 0.</p>
<h2>String Function charCodeAt(n)</h2>
<p>charCodeAt() works similarly like chatAt() function. The only difference is while charAt() returns Character of a specific index charCodeAt() returns Unicode of the Character. Look at the example below.</p>
<pre class="brush: jscript; title: ; notranslate">var myStr = &quot;THIS IS A TABLE.&quot;;
var ch = myStr.charCodeAt(1);</pre>
<p><em>Output will be</em> : 72</p>
<p>72 is the Unicode for Capital H. charCodeAt() accepts integer as the param &amp; returns Unicode value.</p>
<h2>concat(string1, string2, .., stringN)</h2>
<p>String Concatenation is a very common used String operation. Let&#8217;s take a case where in two variables you are getting name of a person. First Name &amp; Last Name. In this case to display the whole name we required to do string Concatenation operation. Look at the example below.</p>
<pre class="brush: jscript; title: ; notranslate">var strFirstName = &quot;Biswabhusan &quot;;
var strLastName = &quot;Panda&quot;;
var wlcmMsg = &quot;You are welcome!&quot;;
var ch = strFirstName.concat(strLastName, &quot; &quot;, wlcmMsg);</pre>
<p><em>Output will be</em> : Biswabhusan Panda You are welcome!</p>
<p>Using Jquery concat() method (<em>Originally derived from JavaScript</em> ) you can concatenate n number of strings. This method accepts n number of strings as parameters. To apply this method choose the first string variable &amp; then concatenate others.</p>
<h2>fromCharCode(n1, n2, &#8230;, nX)</h2>
<p>Refer to the method name fromCharCode() it Converts Unicode value to Character. This is a static method of String object. To use this method you can use String.fromCharCode(). Look at the example below.</p>
<pre class="brush: jscript; title: ; notranslate">var ch = String.fromCharCode(67);</pre>
<p><em>Output will be</em> : C</p>
<p>This function accepts n number of Unicode values.</p>
<h2>String Function indexOf(searchvalue, [start])</h2>
<p>indexOf() method returns the position of a specific value in a string. It return -1 if the value not found in string. While checking the value in string this method considers uppercase &amp; lowercase characters. Using this method we can know whether a specific word exist in the string or not. Look at the example below.</p>
<pre class="brush: jscript; title: ; notranslate">var myStr=&quot;Hello, You are welcome to the my blog.&quot;;
var ch=myStr.indexOf(&quot;welcome&quot;);</pre>
<p><em>Output will be</em> : 14</p>
<p>indexOf() accepts 2 parameters. First parameter is the keyword you want to search in the string. Second parameter is from which index you want to search rest of the string. By default this is 0. 0 means you are searching the string from the beginning.</p>
<h2>lastIndexOf(searchvalue, [start])</h2>
<p>lastIndexOf() method work in similar fashion of indexOf() method. The only difference is it shows the searched value position at the last occurrence of the string. For an example if in a String &#8220;welcome&#8221; appears two times lastIndexOf() method returns the 2nd occurrence of welcome. If searched value not exist in the string it returns -1. This is case sensitive. Welcome is not equal to welcome. While returning the index it counts from the beginning of the string.</p>
<pre class="brush: jscript; title: ; notranslate">var myStr=&quot;This is Biswabhusan Panda, You can only Call Biswabhusan.&quot;;
var ch=myStr.lastIndexOf(&quot;Biswabhusan&quot;);</pre>
<p><em>Output will be</em> : 44</p>
<p>lastIndexOf() accepts 2 parameters like indexOf() method. First parameter is the keyword you want to search in the string. Second parameter is from which index you want to search rest of the string. By default this is 0. 0 means you are searching the string from the beginning.</p>
<h2>substr(start, [length])</h2>
<p>substr() string function used to retrieve part of a string. This function accepts 2 parameters start &amp; length in integer value. Start says from which index you want the part of the string. Length is the number of characters you want from the start index. Let&#8217;s take an example. I have a string &#8220;My Car is blue.&#8221;. In this string if I am applying substr(2, 3) it will return Car.</p>
<pre class="brush: jscript; title: ; notranslate">var myStr=&quot;My Car is blue.&quot;;
var ch=myStr.substr(2, 3);</pre>
<p><em>Output will be</em> : Car</p>
<h2>Popular String Function substring(from, [to])</h2>
<p>substring() works similarly like substr(). But while substr() accepts Start &amp; Length as the parameters substring() accepts From &amp; To. From is the index from which you want your part of the string. To is the index upto which you want to retrieve in part of the string. Let&#8217;s take the same example as shown in substr. You can see the difference while substr(2, 3) return &#8220;Car&#8221; substring(2, 3) will return &#8220;C&#8221;.</p>
<pre class="brush: jscript; title: ; notranslate">var myStr=&quot;My Car is blue.&quot;;
var ch=myStr.substring(2, 3);</pre>
<p><em>Output will be</em> : C</p>
<h2>toLowerCase()</h2>
<p>toLowerCase() converts uppercase letters to lowercase. If in a string you have mix of upper &amp; lower case letter this function will return that string in lowercase only.</p>
<pre class="brush: jscript; title: ; notranslate">var myStr=&quot;Biswabhusan&quot;;
var ch = myStr.toLowerCase();</pre>
<p><em>Output will be</em> : biswabhusan</p>
<h2>toUpperCase()</h2>
<p>toUpperCase() converts lowercase letters to uppercase. If in a string you have mix of upper &amp; lower case letter this function will return that string in uppercase only.</p>
<pre class="brush: jscript; title: ; notranslate">var myStr=&quot;Biswabhusan&quot;;
var ch = myStr.toUpperCase();</pre>
<p><em>Output will be</em> : BISWABHUSAN</p>
<h2>match(regexp)</h2>
<p>match() function accepts regular expression &amp; returns the matches as an Array Object. Look at the example below.</p>
<pre class="brush: jscript; title: ; notranslate">var myStr=&quot;The rain in SPAIN stays mainly in the plain&quot;;
var ch=myStr.match(/ain/g);</pre>
<p><em>Output will be</em> : ain, ain, ain</p>
<h2>replace(searchvalue, newvalue)</h2>
<p>replace() function is one more <a href="https://jharaphula.com/rc2-md5-byte-128-cryptography-functions/" target="_blank" rel="noopener noreferrer">very useful function</a> of string operation. In-case in a string if you want to replace some characters with another characters this function helps. It accepts 2 parameters. First parameter is the search value &amp; second parameter is the replacement for search value. Look at the example below.</p>
<pre class="brush: jscript; title: ; notranslate">var myStr=&quot;This is an awesome Blog.&quot;;
var ch = myStr.replace(&quot;awesome &quot;,&quot;interesting &quot;);</pre>
<p><em>Output will be</em> : This is an interesting Blog.</p>
<h2>search(searchvalue)</h2>
<p>search() method help to search a specific value in a string. If search value exists in the string it returns the index or else if string doesn&#8217;t contain the value it returns -1.</p>
<pre class="brush: jscript; title: ; notranslate">var myStr = &quot;Welcome to my Blog!&quot;;
var ch = myStr.search(&quot;my&quot;);</pre>
<p><em>Output will be</em> : 11</p>
<h2>slice(start, [end])</h2>
<p>slice() method extract part of the string in a new string. It accepts 2 parameters start &amp; end. Depending upon start &amp; end value it returns the new string.</p>
<pre class="brush: jscript; title: ; notranslate">var myStr = &quot;Visit Jquery Blog!&quot;;
var n = myStr.slice(6, 12);</pre>
<p><em>Output will be</em> : Jquery</p>
<h2>String Function split(separator, [limit])</h2>
<p>split() method used to divide a string from a specific character. It returns sub-strings in array. Split method accepts 2 parameters. Separator &amp; limit. In separator if you use empty char &#8220;&#8221; it will divide all characters individually as a sub-string. Limit is always an integer value which specifies the number of splits.</p>
<pre class="brush: jscript; title: ; notranslate">var myStr = &quot;How are you doing today?&quot;;
var arr = myStr.split(&quot; &quot;,3);</pre>
<p><em>Output will be</em> : How,are,you</p>
<h2>Best Practices</h2>
<p>1. Use Native JavaScript Methods – jQuery does not replace JavaScript’s string functions.<br />
2. Sanitize Inputs – Prevent XSS by escaping user-generated content.<br />
3. Optimize Loops – Avoid excessive string operations in loops.<br />
4. Leverage ES6 Features – Use template literals for cleaner code.</p>
<h2>Conclusion</h2>
<p>jQuery enhances string manipulation by simplifying DOM interactions, but it relies on JavaScript’s native string methods. Understanding these functions—such as `substring()`, `trim()`, and regex—enables efficient text processing in web applications. By combining jQuery’s DOM utilities with JavaScript’s string capabilities, developers can build dynamic, user-friendly interfaces. Mastering these techniques ensures robust and maintainable code for modern web development.</p>
<p>The post <a href="https://jharaphula.com/jquery-string-functions/">JQuery String Functions (Replace, Substr, IndexOf, lastIndexOf, Substring, &#8230;)</a> appeared first on <a href="https://jharaphula.com">OneStop Shop</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://jharaphula.com/jquery-string-functions/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			<media:content url="https://jharaphula.com/wp-content/uploads/2016/05/jquery-1024x677.jpg" medium="image" />
	</item>
		<item>
		<title>How to Create your Own Jquery Custom plugin using $.fn?</title>
		<link>https://jharaphula.com/how-create-jquery-custom-plugin/</link>
					<comments>https://jharaphula.com/how-create-jquery-custom-plugin/#respond</comments>
		
		<dc:creator><![CDATA[Nibedita Panda]]></dc:creator>
		<pubDate>Sun, 15 May 2016 07:24:41 +0000</pubDate>
				<category><![CDATA[Learn JQuery with Examples]]></category>
		<category><![CDATA[Chaining]]></category>
		<category><![CDATA[Create your Own plugin]]></category>
		<category><![CDATA[Function in JQuery]]></category>
		<category><![CDATA[Jquery Custom plugin]]></category>
		<guid isPermaLink="false">http://box.jharaphula.com/?p=1331</guid>

					<description><![CDATA[<img width="300" height="185" src="https://jharaphula.com/wp-content/uploads/2016/05/custom-jquery-plugin-300x185.jpg" class="webfeedsFeaturedVisual wp-post-image" alt="How to Create your Own Jquery Custom plugin using $.fn?" style="display: block; margin-bottom: 10px; clear: both; max-width: 100%;" decoding="async" loading="lazy" srcset="https://jharaphula.com/wp-content/uploads/2016/05/custom-jquery-plugin-300x185.jpg 300w, https://jharaphula.com/wp-content/uploads/2016/05/custom-jquery-plugin.jpg 750w" sizes="auto, (max-width: 300px) 100vw, 300px" /><p>In programming reuse of codes is a best practice. If the similar functionality you are going to use several times in an application it is...</p>
<p>The post <a href="https://jharaphula.com/how-create-jquery-custom-plugin/">How to Create your Own Jquery Custom plugin using $.fn?</a> appeared first on <a href="https://jharaphula.com">OneStop Shop</a>.</p>
]]></description>
										<content:encoded><![CDATA[<img width="300" height="185" src="https://jharaphula.com/wp-content/uploads/2016/05/custom-jquery-plugin-300x185.jpg" class="webfeedsFeaturedVisual wp-post-image" alt="How to Create your Own Jquery Custom plugin using $.fn?" style="display: block; margin-bottom: 10px; clear: both; max-width: 100%;" decoding="async" loading="lazy" srcset="https://jharaphula.com/wp-content/uploads/2016/05/custom-jquery-plugin-300x185.jpg 300w, https://jharaphula.com/wp-content/uploads/2016/05/custom-jquery-plugin.jpg 750w" sizes="auto, (max-width: 300px) 100vw, 300px" /><p>In programming <strong>reuse of codes is a best practice</strong>. If the similar functionality you are going to use several times in an application it is suggested to create a common function. Modular approach saves programmers time, easy to maintain, debug as well as help to <a href="https://jharaphula.com/best-practices-website-speed-performance/" target="_blank" rel="noopener noreferrer">improves performance of application</a>. The above concept in JQuery is called Plugin. In this session let us explore How to Create your Own Jquery Custom plugin.</p>
<h3>Example of Jquery Custom plugin</h3>
<pre class="brush: jscript; title: ; notranslate">$.fn.bgcolor = function() {
this.css(&quot;background-color&quot;, &quot;#00FF00&quot;);
};
 
$(&quot;div&quot;).bgcolor();</pre>
<p>Refer to the above example here I created a function bgcolor. Inside this function I am updating background color. To implement this after selector you just need to put a dot &amp; the method name. As a advice if you are looking to create your own plugin related to trigonometry calculations, first create a js file with suitable name &amp; there using $.fn add your required functions one by one. This method saves time as well as easy to debug.</p>
<h3>Chaining</h3>
<p>During development sometimes we required to implement 5 to 6 methods for one selector. In this case return this; statement is useful. To make your plugin more friendly with real world it is better to add return this; statement at the end of your functionalities. Look at the example below to know how Chaining works in JQuery.</p>
<pre class="brush: jscript; title: ; notranslate">$.fn.bgcolor = function() {
this.css(&quot;background-color&quot;, &quot;#00FF00&quot;);
return this;
};
 
$(&quot;div&quot;).bgcolor().addClass(&quot;updateBgColor&quot;);</pre>
<h3>Protecting the $ Alias</h3>
<p>$ is a common used variable in JQuery. Some time it conflicts with other libraries. To avoid this while writing your own JQuery plugin keep remember to use like the following example.</p>
<pre class="brush: jscript; title: ; notranslate">(function ( $ ) { $.fn.bgcolor = function() {
this.css(&quot;background-color&quot;, &quot;#00FF00&quot;);
return this;
}; }(jquery));</pre>
<h3>Minimizing repetition of $.fn in your Plugin</h3>
<p>To improve performance of your own plugin it is better to reduce repetition of $.fn as much as you can. Let&#8217;s talk about the below example here from you can know how to avoid unwanted $.fn.</p>
<pre class="brush: jscript; title: ; notranslate">(function($) {
$.fn.whileTrue = function() {
// To Do stuffs while True.
};
$.fn.whileFlase = function() {
// To Do stuffs while False.
};
}(jquery));</pre>
<p>Compare to above it is more better to use the following.</p>
<pre class="brush: jscript; title: ; notranslate">(function($) {
$.fn.WhileAction = function(action) {
if (action === &quot;True&quot;) {
// To Do stuffs while True.
}
if (action === &quot;False&quot;) {
// To Do stuffs while False.
}
};
}(jquery));</pre>
<h3>Use each() Method</h3>
<p>While writing your own plugin if you want to do any manipulating with specific elements then prefer to use .each() to loop through the elements. Look at the example below.</p>
<pre class="brush: jscript; title: ; notranslate">$.fn.myPlugin = function() {
return this.each(function() {
// To Do something for each element here.
});
};</pre>
<p>The post <a href="https://jharaphula.com/how-create-jquery-custom-plugin/">How to Create your Own Jquery Custom plugin using $.fn?</a> appeared first on <a href="https://jharaphula.com">OneStop Shop</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://jharaphula.com/how-create-jquery-custom-plugin/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			<media:content url="https://jharaphula.com/wp-content/uploads/2016/05/custom-jquery-plugin.jpg" medium="image" />
	</item>
		<item>
		<title>JQuery Treeview example using HTML Ul li elements</title>
		<link>https://jharaphula.com/jquery-treeview-example/</link>
					<comments>https://jharaphula.com/jquery-treeview-example/#respond</comments>
		
		<dc:creator><![CDATA[Nibedita Panda]]></dc:creator>
		<pubDate>Sat, 14 May 2016 12:22:09 +0000</pubDate>
				<category><![CDATA[Learn JQuery with Examples]]></category>
		<category><![CDATA[hierarchy]]></category>
		<category><![CDATA[HTML elements]]></category>
		<category><![CDATA[HTML Ul li elements]]></category>
		<category><![CDATA[JQuery Treeview example]]></category>
		<guid isPermaLink="false">http://box.jharaphula.com/?p=1055</guid>

					<description><![CDATA[<img width="300" height="184" src="https://jharaphula.com/wp-content/uploads/2016/05/jquery-treeview-300x184.jpg" class="webfeedsFeaturedVisual wp-post-image" alt="JQuery Treeview example using HTML Ul li elements" style="display: block; margin-bottom: 10px; clear: both; max-width: 100%;" decoding="async" loading="lazy" srcset="https://jharaphula.com/wp-content/uploads/2016/05/jquery-treeview-300x184.jpg 300w, https://jharaphula.com/wp-content/uploads/2016/05/jquery-treeview.jpg 750w" sizes="auto, (max-width: 300px) 100vw, 300px" /><p>To display large number of data we prefer to use Treeview. Let&#8217;s take an example where we want to show all those countries &#38; their...</p>
<p>The post <a href="https://jharaphula.com/jquery-treeview-example/">JQuery Treeview example using HTML Ul li elements</a> appeared first on <a href="https://jharaphula.com">OneStop Shop</a>.</p>
]]></description>
										<content:encoded><![CDATA[<img width="300" height="184" src="https://jharaphula.com/wp-content/uploads/2016/05/jquery-treeview-300x184.jpg" class="webfeedsFeaturedVisual wp-post-image" alt="JQuery Treeview example using HTML Ul li elements" style="display: block; margin-bottom: 10px; clear: both; max-width: 100%;" decoding="async" loading="lazy" srcset="https://jharaphula.com/wp-content/uploads/2016/05/jquery-treeview-300x184.jpg 300w, https://jharaphula.com/wp-content/uploads/2016/05/jquery-treeview.jpg 750w" sizes="auto, (max-width: 300px) 100vw, 300px" /><p>To display large number of data we prefer to use Treeview. Let&#8217;s take an example where we want to show all those countries &amp; their respective states where we have our customers. In the below jQuery Treeview example I implemented the Same. This Treeview is simply created using Jquery. Using this Treeview you can show any level of data in hierarchy manner.</p>
<p><a href="https://jharaphula.com/category/programming-solutions/learn-jquery-with-examples/" target="_blank" rel="noopener noreferrer">Jquery is an advanced programming language</a>. For a Jquery professional it is very simple to create a Treeview. Look at the example below here I used only 5 to 6 lines of codes to create a Treeview. The logic I implemented here is so straight forward. In HTML I have ul &amp; li elements which represents data for my Treeview. UL elements inside li elements are sub nodes. Using Jquery document.ready method initially I am tracking all the li elements &amp; inside the li elements which ul elements length is greater than zero I am adding a class &#8220;node&#8221; for them.</p>
<h2>Introduction to jQuery Treeview</h2>
<p>A treeview is a hierarchical data structure that organizes elements in a parent-child relationship, resembling the branches of a tree. In web development, jQuery Treeview is a popular plugin that simplifies the creation and management of interactive tree structures. It allows users to expand, collapse, and navigate through nested items efficiently.</p>
<h2>Key Features of jQuery Treeview</h2>
<p>1. Dynamic Loading jQuery Treeview supports dynamic loading of nodes, enabling efficient handling of large datasets. Only the necessary nodes are loaded when expanded, reducing initial page load time.</p>
<p>2. Customizable Appearance Developers can easily customize the tree’s appearance using CSS. Icons, colors, and spacing can be adjusted to match the website’s design.</p>
<p>3. Interactive Controls Users can expand and collapse nodes with a single click, making navigation intuitive. Some implementations support drag-and-drop functionality for reordering nodes.</p>
<p>4. Ajax Support The plugin can fetch data asynchronously from a server using Ajax, ensuring seamless updates without full page reloads.</p>
<p>5. Event Handling jQuery Treeview provides event callbacks for actions like node selection, expansion, and collapse, allowing developers to trigger custom functions.</p>
<p>Then in the next loop I am detecting the li elements with class &#8220;node&#8221; and for their anchor tags click event binding toggle class &#8220;active&#8221;. To show the expand &amp; collapsible feature smooth I used slideToggle with slow.</p>
<h2>JQuery Treeview Example</h2>
<pre class="brush: xml; title: ; notranslate">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; &gt;
&lt;head&gt;
&lt;title&gt;JQuery Treeview example&lt;/title&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;http://code.jquery.com/jquery-1.9.1.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
$(document).ready(function() {
$('.treeview li').each(function() {
if($(this).children('ul').length &gt; 0) {
$(this).addClass('node');
}
});

$('.treeview li.node &gt; a').click(function() {
$(this).parent().toggleClass('active');
$(this).parent().children('ul').slideToggle('slow');
});
});
&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div class=&quot;treeview&quot;&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Pakistan&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Faisalabad&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Karachi&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Gujranwala&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;India&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Odisha&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Bhubaneswar&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Cuttuck&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Balasore&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Balasore Golei&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;MPC College Road&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;FM University Road&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;West Bengal&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Nepal&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Kathmandu&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Bharatpur&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
<h2>Treeview CSS Styles for Ul li elements</h2>
<pre class="brush: css; title: ; notranslate">ul, #myUL { list-style-type: none; }
#myUL { margin: 0px; padding: 0px; }
.box { cursor: pointer; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; }
.box::before { content: &quot;\2610&quot;; color: black; display: inline-block; margin-right: 7px; }
.check-box::before { content: &quot;\2611&quot;; color: lightblue; }
.nested { display: none; }
.active { display: block; }</pre>
<h2>Common Use Cases</h2>
<p>1. File Browsers – Navigate directory structures.<br />
2. Navigation Menus – Create multi-level dropdown menus.<br />
3. Data Organization – Display hierarchical data like categories or organizational charts.</p>
<h2>Best Practices</h2>
<p>&#8211; Optimize Performance<br />
– Use lazy loading for large trees.<br />
&#8211; Ensure Accessibility – Add ARIA attributes for screen readers.<br />
&#8211; Test Cross-Browser Compatibility – Verify functionality across browsers.</p>
<h2>Conclusion</h2>
<p>jQuery Treeview is a versatile tool for creating interactive, hierarchical structures in web applications. Its ease of customization, dynamic loading capabilities, and event-driven architecture make it a preferred choice for developers. By following best practices, you can implement efficient and user-friendly treeviews that enhance navigation and data organization. Whether for file browsers, menus, or data visualization, jQuery Treeview simplifies complex hierarchies with minimal code.</p>
<p>The post <a href="https://jharaphula.com/jquery-treeview-example/">JQuery Treeview example using HTML Ul li elements</a> appeared first on <a href="https://jharaphula.com">OneStop Shop</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://jharaphula.com/jquery-treeview-example/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			<media:content url="https://jharaphula.com/wp-content/uploads/2016/05/jquery-treeview.jpg" medium="image" />
	</item>
		<item>
		<title>Example of JQuery Slideshow using Images with Description</title>
		<link>https://jharaphula.com/jquery-slideshow-images-description/</link>
					<comments>https://jharaphula.com/jquery-slideshow-images-description/#respond</comments>
		
		<dc:creator><![CDATA[Nibedita Panda]]></dc:creator>
		<pubDate>Sat, 14 May 2016 10:13:22 +0000</pubDate>
				<category><![CDATA[Learn JQuery with Examples]]></category>
		<category><![CDATA[Example of JQuery Slideshow]]></category>
		<category><![CDATA[JQuery Slideshow]]></category>
		<category><![CDATA[JQuery Slideshow using Images]]></category>
		<category><![CDATA[Slideshow using Images with Description]]></category>
		<guid isPermaLink="false">http://box.jharaphula.com/?p=994</guid>

					<description><![CDATA[<img width="300" height="200" src="https://jharaphula.com/wp-content/uploads/2016/05/film-reels-300x200.jpg" class="webfeedsFeaturedVisual wp-post-image" alt="Example of JQuery Slideshow using Images with Description" style="display: block; margin-bottom: 10px; clear: both; max-width: 100%;" decoding="async" loading="lazy" srcset="https://jharaphula.com/wp-content/uploads/2016/05/film-reels-300x200.jpg 300w, https://jharaphula.com/wp-content/uploads/2016/05/film-reels-182x120.jpg 182w, https://jharaphula.com/wp-content/uploads/2016/05/film-reels-106x70.jpg 106w, https://jharaphula.com/wp-content/uploads/2016/05/film-reels.jpg 600w" sizes="auto, (max-width: 300px) 100vw, 300px" /><p>Slideshow is very useful for fancy websites. Recently I worked for a Bollywood portal. There I have to show top 10 actresses of Bollywood with...</p>
<p>The post <a href="https://jharaphula.com/jquery-slideshow-images-description/">Example of JQuery Slideshow using Images with Description</a> appeared first on <a href="https://jharaphula.com">OneStop Shop</a>.</p>
]]></description>
										<content:encoded><![CDATA[<img width="300" height="200" src="https://jharaphula.com/wp-content/uploads/2016/05/film-reels-300x200.jpg" class="webfeedsFeaturedVisual wp-post-image" alt="Example of JQuery Slideshow using Images with Description" style="display: block; margin-bottom: 10px; clear: both; max-width: 100%;" decoding="async" loading="lazy" srcset="https://jharaphula.com/wp-content/uploads/2016/05/film-reels-300x200.jpg 300w, https://jharaphula.com/wp-content/uploads/2016/05/film-reels-182x120.jpg 182w, https://jharaphula.com/wp-content/uploads/2016/05/film-reels-106x70.jpg 106w, https://jharaphula.com/wp-content/uploads/2016/05/film-reels.jpg 600w" sizes="auto, (max-width: 300px) 100vw, 300px" /><p>Slideshow is very useful for fancy websites. Recently I worked for a Bollywood portal. There I have to show <a href="https://jharaphula.com/highest-paid-celebrities-bollywood/" target="_blank" rel="noopener noreferrer">top 10 actresses of Bollywood</a> with little description about them. I did this using JQuery. Here to show you the demo I used only 3 images (<em>Image-A.png, Image-B.png &amp; Image-C.png</em>). Resolution for these images are 500 x 257. You can customize the below code as per your requirements. If you are changing size of images you just need to update related CSS classes.</p>
<p>Technically speaking to implement JQuery Slideshow is very easy. Refer to the below example after HTML &amp; CSS i wrote a small Jquery function. In side the function I am tracking each slide &amp; storing them to a temporary div. To move the slides I have the updatePosition() function which called in each 3 seconds using setInterval();</p>
<p>To show description with image in this demo I added one transBg.png image which will show you the transparent background over each slide. In HTML for each slide I have div with the class eachSlide. In side this I have image &amp; one more div for description. To set margin for description here I used paragraph inside the description div. You can add any kind of HTML in this div as your description.</p>
<p>To run this example Copy the following code to a file jquery-slideshow.htm. Then save the below 4 images in the same folder &amp; Run. Keep remember in this demo I used Jquery CDN link.</p>
<h3>JQuery-Slideshow.htm</h3>
<pre class="brush: xml; title: ; notranslate">&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;head&gt;
&lt;title&gt;Example of JQuery Slideshow&lt;/title&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;http://code.jquery.com/jquery-1.9.1.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
$(function() {
var presentPosition = 0;
var slideWidth = 500;
var inSlide = $('.eachSlide');
var totalNoSlides = inSlide.length;
setInterval(updatePosition, 3000);
inSlide.wrapAll('&lt;div id=&quot;tempHolder&quot;&gt;&lt;/div&gt;');
inSlide.css({ 'float': 'left' });
$('#tempHolder').css('width', slideWidth * totalNoSlides);
function updatePosition() {
if (presentPosition == totalNoSlides - 1) {
presentPosition = 0;
}
else {
presentPosition++;
}
moveSlide();
}
function moveSlide() {
$('#tempHolder').animate({ 'marginLeft': slideWidth * (-presentPosition) });
}
});
&lt;/script&gt;
&lt;style type=&quot;text/css&quot;&gt;
#slideshow {
position: relative;
}
#slideshow #showArea {
height: 257px;
margin: 0;
overflow: hidden;
padding: 0;
position: relative;
width: 500px;
}
#slideshow #showArea .eachSlide {
height: 257px;
margin: 0;
padding: 0;
position: relative;
width: 500px;
}
/*Class for Description*/
.description {
background: url(&quot;transBg.png&quot;) repeat scroll 0 0 rgba(0, 0, 0, 0);
position: absolute;
color: #FFFFFF;
font-family: Arial,sans-serif,verdana;
height: 70px;
left: 0px;
top: 190px;
width: 100%;
margin: 0px;
padding: 0px;
}
/*Setting margin for Description Paragraph*/
.description p {
margin: 10px 0px 0px 10px;
}
&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;!--Slideshow main Div--&gt;
&lt;div id=&quot;slideshow&quot;&gt;
&lt;div id=&quot;showArea&quot;&gt;
&lt;!--Slideshow indivisual Div--&gt;
&lt;div class=&quot;eachSlide&quot;&gt;
&lt;img title=&quot;&quot; alt=&quot;&quot; src=&quot;Image-A.png&quot; /&gt;
&lt;div class=&quot;description&quot;&gt;&lt;p&gt;From the heart beats of Millions, You are going to read about the Queen of Bollywood. The real name Katrina Turquotte...&lt;/p&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;eachSlide&quot;&gt;
&lt;img title=&quot;&quot; alt=&quot;&quot; src=&quot;Image-B.png&quot; /&gt;
&lt;div class=&quot;description&quot;&gt;&lt;p&gt;From our recent study we found Sunny Leone as one of the most searched actress from Film Industry...&lt;/p&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;eachSlide&quot;&gt;
&lt;img title=&quot;&quot; alt=&quot;&quot; src=&quot;Image-C.png&quot; /&gt;
&lt;div class=&quot;description&quot;&gt;&lt;p&gt;Priyanka Chopra is an Indian Celebrity. She was born on 18th July 1982 at Jamshedpur...&lt;/p&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
<h3>Images</h3>
<p><img loading="lazy" decoding="async" src="https://jharaphula.com/wp-content/uploads/2016/05/transBg.png" alt="transBg" width="13" height="19" class="alignnone size-full wp-image-3763" /><br />
<em>transBg.png</em></p>
<p><img loading="lazy" decoding="async" src="https://jharaphula.com/wp-content/uploads/2016/05/Image-A.png" alt="Image-A" width="500" height="257" class="alignnone size-full wp-image-3764" srcset="https://jharaphula.com/wp-content/uploads/2016/05/Image-A.png 500w, https://jharaphula.com/wp-content/uploads/2016/05/Image-A-300x154.png 300w" sizes="auto, (max-width: 500px) 100vw, 500px" /><br />
<em>Image-A.png</em></p>
<p><img loading="lazy" decoding="async" src="https://jharaphula.com/wp-content/uploads/2016/05/Image-B.jpg" alt="" width="500" height="257" class="alignnone size-full wp-image-7597" srcset="https://jharaphula.com/wp-content/uploads/2016/05/Image-B.jpg 500w, https://jharaphula.com/wp-content/uploads/2016/05/Image-B-300x154.jpg 300w" sizes="auto, (max-width: 500px) 100vw, 500px" /><br />
<em>Image-B.png</em></p>
<p><img loading="lazy" decoding="async" src="https://jharaphula.com/wp-content/uploads/2016/05/Image-C.png" alt="Image-C" width="500" height="257" class="alignnone size-full wp-image-3766" srcset="https://jharaphula.com/wp-content/uploads/2016/05/Image-C.png 500w, https://jharaphula.com/wp-content/uploads/2016/05/Image-C-300x154.png 300w" sizes="auto, (max-width: 500px) 100vw, 500px" /><br />
<em>Image-C.png</em></p>
<p>The post <a href="https://jharaphula.com/jquery-slideshow-images-description/">Example of JQuery Slideshow using Images with Description</a> appeared first on <a href="https://jharaphula.com">OneStop Shop</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://jharaphula.com/jquery-slideshow-images-description/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			<media:content url="https://jharaphula.com/wp-content/uploads/2016/05/film-reels.jpg" medium="image" />
	</item>
		<item>
		<title>Simple Jquery Carousel without using any third-party plugin</title>
		<link>https://jharaphula.com/simple-jquery-carousel-plugin/</link>
					<comments>https://jharaphula.com/simple-jquery-carousel-plugin/#respond</comments>
		
		<dc:creator><![CDATA[Nibedita Panda]]></dc:creator>
		<pubDate>Sat, 14 May 2016 10:10:41 +0000</pubDate>
				<category><![CDATA[Learn JQuery with Examples]]></category>
		<category><![CDATA[Carousel]]></category>
		<category><![CDATA[Jquery Carousel Slider]]></category>
		<category><![CDATA[Simple Jquery Carousel]]></category>
		<category><![CDATA[third-party plugin]]></category>
		<guid isPermaLink="false">http://box.jharaphula.com/?p=992</guid>

					<description><![CDATA[<img width="300" height="194" src="https://jharaphula.com/wp-content/uploads/2016/05/carosel-effect-without-plugin-300x194.png" class="webfeedsFeaturedVisual wp-post-image" alt="Simple Jquery Carousel Slider without using any plugin" style="display: block; margin-bottom: 10px; clear: both; max-width: 100%;" decoding="async" loading="lazy" srcset="https://jharaphula.com/wp-content/uploads/2016/05/carosel-effect-without-plugin-300x194.png 300w, https://jharaphula.com/wp-content/uploads/2016/05/carosel-effect-without-plugin-294x190.png 294w, https://jharaphula.com/wp-content/uploads/2016/05/carosel-effect-without-plugin-106x70.png 106w, https://jharaphula.com/wp-content/uploads/2016/05/carosel-effect-without-plugin.png 750w" sizes="auto, (max-width: 300px) 100vw, 300px" /><p>To display number of images with independent captions Carousel effect helps a great. Recently I worked for a shopping cart application which is used by...</p>
<p>The post <a href="https://jharaphula.com/simple-jquery-carousel-plugin/">Simple Jquery Carousel without using any third-party plugin</a> appeared first on <a href="https://jharaphula.com">OneStop Shop</a>.</p>
]]></description>
										<content:encoded><![CDATA[<img width="300" height="194" src="https://jharaphula.com/wp-content/uploads/2016/05/carosel-effect-without-plugin-300x194.png" class="webfeedsFeaturedVisual wp-post-image" alt="Simple Jquery Carousel Slider without using any plugin" style="display: block; margin-bottom: 10px; clear: both; max-width: 100%;" decoding="async" loading="lazy" srcset="https://jharaphula.com/wp-content/uploads/2016/05/carosel-effect-without-plugin-300x194.png 300w, https://jharaphula.com/wp-content/uploads/2016/05/carosel-effect-without-plugin-294x190.png 294w, https://jharaphula.com/wp-content/uploads/2016/05/carosel-effect-without-plugin-106x70.png 106w, https://jharaphula.com/wp-content/uploads/2016/05/carosel-effect-without-plugin.png 750w" sizes="auto, (max-width: 300px) 100vw, 300px" /><p>To display number of images with independent captions Carousel effect helps a great. Recently I worked for a shopping cart application which is used by more then 22 global costume manufactures of America. During I designed their landing page few Customers suggested me to use Carousel effects. They want to display their <a href="https://jharaphula.com/popular-midnight-hot-fashion-shows-of-states/" rel="noopener noreferrer" target="_blank">Fashion weeks</a> top models with two lines of text in each slide. According to forward &amp; backward button slides need to scroll horizontally. My Customers knows that I am an expert in Jquery. When I ask them can I use free plugins to implement Carousel? Simply they said &#8220;No, please design a Simple jQuery Carousel.&#8221;. I did that and presenting the same codes here. Only in place of images here I am using 14 slides with Alphabets to identify each. You can update them as per your requirements.</p>
<p>The logic I implemented in the below example is very simple &amp; straight forward. To keep each slide independent here I used HTML ul &amp; li elements. Total I have 14 slides named as A, B, C, &#8230;, M, N. Including this in body I have 2 more links Backward &amp; Forward. Intention of these two links are when user will click on backward link it will show the slides available in left side &amp; on click of forward button it will show the right side slides. After slide A slide N will show like a Circular Order.</p>
<p>To control width, height &amp; color here I used CSS. Slide movement Logic is implemented in Jquery. On click of each link I am updating the CSS left property value for last item.</p>
<h3>Simple-Jquery-Carousel.htm</h3>
<pre class="brush: xml; title: ; notranslate">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; &gt;
&lt;head&gt;
&lt;title&gt;Simple Jquery Carousel Slider&lt;/title&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;http://code.jquery.com/jquery-1.9.1.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
$(function(){
var carSlide = $('.jquery-carousel ul');
var carSlideChild = carSlide.find('li');
var NumberOfClick = 0;
var isClick = true;
/*Adding 1px margin to Carousel Slide*/
itemLength = carSlide.find('li:first').width() + 1;

carSlide.width(itemLength*carSlideChild.length);
refreshPosition();

$('.btnForward').click(function(){
if(isClick){
isClick = false;
NumberOfClick++;

carSlide.stop(false, true).animate({
left : '-='+itemLength
},300, function(){
lastItem = carSlide.find('li:first');
lastItem.remove().appendTo(carSlide);
lastItem.css('left', ((carSlideChild.length-1)*(itemLength))+(NumberOfClick*itemLength));
isClick = true;
});
}
});

$('.btnBackward').click(function(){
if(isClick){
isClick = false;
NumberOfClick--;
lastItem = carSlide.find('li:last');
lastItem.remove().prependTo(carSlide);

lastItem.css('left', itemLength*NumberOfClick);
carSlide.finish(true).animate({
left: '+='+itemLength
},300, function(){
isClick = true;
});
}
});

function refreshPosition(){
carSlideChild.each(function(){
$(this).css('left', itemLength*carSlideChild.index($(this)));
});
}
});
&lt;/script&gt;
&lt;style type=&quot;text/css&quot;&gt;
.jquery-carousel {
position: relative;
padding-top: 20px;
overflow: hidden;
width: 306px;
height: 50px;
}
.jquery-carousel ul {
position: relative;
height: 50px;
list-style: none;
list-style-type: none;
margin: 0px;
padding: 0px;
}
.jquery-carousel ul li {
position: absolute;
float: left;
margin-right: 1px;
background: #CCCCCC;
width: 50px;
height: 25px;
text-align: center;
padding-top: 25px;
}
&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;a href=&quot;javascript:void(0);&quot; class=&quot;btnBackward&quot;&gt;Backward&lt;/a&gt;
&lt;a href=&quot;javascript:void(0);&quot; class=&quot;btnForward&quot;&gt;Forward&lt;/a&gt;
&lt;div class=&quot;jquery-carousel&quot;&gt;
&lt;ul&gt;
&lt;li&gt;A&lt;/li&gt;
&lt;li&gt;B&lt;/li&gt;
&lt;li&gt;C&lt;/li&gt;
&lt;li&gt;D&lt;/li&gt;
&lt;li&gt;E&lt;/li&gt;
&lt;li&gt;F&lt;/li&gt;
&lt;li&gt;G&lt;/li&gt;
&lt;li&gt;H&lt;/li&gt;
&lt;li&gt;I&lt;/li&gt;
&lt;li&gt;J&lt;/li&gt;
&lt;li&gt;K&lt;/li&gt;
&lt;li&gt;L&lt;/li&gt;
&lt;li&gt;M&lt;/li&gt;
&lt;li&gt;N&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
<p>The post <a href="https://jharaphula.com/simple-jquery-carousel-plugin/">Simple Jquery Carousel without using any third-party plugin</a> appeared first on <a href="https://jharaphula.com">OneStop Shop</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://jharaphula.com/simple-jquery-carousel-plugin/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			<media:content url="https://jharaphula.com/wp-content/uploads/2016/05/carosel-effect-without-plugin.png" medium="image" />
	</item>
		<item>
		<title>Example of Simple Accordion Jquery menu without using Jquery UI</title>
		<link>https://jharaphula.com/example-simple-accordion-jquery-menu/</link>
					<comments>https://jharaphula.com/example-simple-accordion-jquery-menu/#comments</comments>
		
		<dc:creator><![CDATA[Nibedita Panda]]></dc:creator>
		<pubDate>Sat, 14 May 2016 10:09:19 +0000</pubDate>
				<category><![CDATA[Learn JQuery with Examples]]></category>
		<category><![CDATA[Example of Simple Accordion]]></category>
		<category><![CDATA[Jquery Menu]]></category>
		<category><![CDATA[Jquery UI]]></category>
		<category><![CDATA[Simple Accordion Jquery]]></category>
		<guid isPermaLink="false">http://box.jharaphula.com/?p=990</guid>

					<description><![CDATA[<img width="300" height="195" src="https://jharaphula.com/wp-content/uploads/2016/05/jquery-ui-300x195.jpg" class="webfeedsFeaturedVisual wp-post-image" alt="Example of Simple Accordion Jquery menu without using Jquery UI" style="display: block; margin-bottom: 10px; clear: both; max-width: 100%;" decoding="async" loading="lazy" srcset="https://jharaphula.com/wp-content/uploads/2016/05/jquery-ui-300x195.jpg 300w, https://jharaphula.com/wp-content/uploads/2016/05/jquery-ui-294x190.jpg 294w, https://jharaphula.com/wp-content/uploads/2016/05/jquery-ui-106x70.jpg 106w, https://jharaphula.com/wp-content/uploads/2016/05/jquery-ui.jpg 750w" sizes="auto, (max-width: 300px) 100vw, 300px" /><p>In some scenario we required to design expand &#38; collapsible control using pure Jquery. Let&#8217;s assume the application for which we are going to design...</p>
<p>The post <a href="https://jharaphula.com/example-simple-accordion-jquery-menu/">Example of Simple Accordion Jquery menu without using Jquery UI</a> appeared first on <a href="https://jharaphula.com">OneStop Shop</a>.</p>
]]></description>
										<content:encoded><![CDATA[<img width="300" height="195" src="https://jharaphula.com/wp-content/uploads/2016/05/jquery-ui-300x195.jpg" class="webfeedsFeaturedVisual wp-post-image" alt="Example of Simple Accordion Jquery menu without using Jquery UI" style="display: block; margin-bottom: 10px; clear: both; max-width: 100%;" decoding="async" loading="lazy" srcset="https://jharaphula.com/wp-content/uploads/2016/05/jquery-ui-300x195.jpg 300w, https://jharaphula.com/wp-content/uploads/2016/05/jquery-ui-294x190.jpg 294w, https://jharaphula.com/wp-content/uploads/2016/05/jquery-ui-106x70.jpg 106w, https://jharaphula.com/wp-content/uploads/2016/05/jquery-ui.jpg 750w" sizes="auto, (max-width: 300px) 100vw, 300px" /><p>In some scenario we required to design expand &amp; collapsible control using pure Jquery. Let&#8217;s assume the application for which we are going to design Accordion is not using Jquery UI. Jquery UI is having its own in-build Accordion <a href="https://jharaphula.com/php-string-functions-with-example/" rel="noopener noreferrer" target="_blank">function</a>. Using this it is a line of code to implement accordion. In this example let me show you how to create an accordion Jquery menu without using jQuery UI library.</p>
<p>In the below example I have 4 div&#8217;s. Div id&#8217;s with header-A &amp; header-B are the header tabs for my accordion. On click of this headers I need to show the body-A &amp; body-B div&#8217;s respectively. Referring a Jquery CDN library here inside the document.ready() method initially I am hiding all the body div&#8217;s. Then on click of each header div I am checking whether the respective body div is visible or not. If the div is hidden then I am applying Jquery show method to display the relative body div. If the div is visible then I am hiding the respective body div. To make the accordion collapse &amp; expand features smooth I used slow as a parameter to show() &amp; hide() methods.</p>
<h3>Accordion-Jquery.htm</h3>
<pre class="brush: xml; title: ; notranslate">&lt;!Doctype html&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; &gt;
&lt;head&gt;
&lt;title&gt;Example of Simple Accordion Jquery menu&lt;/title&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;http://code.jquery.com/jquery-1.9.1.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
$(document).ready(function(){
/*Initially hiding all sub div*/
$(&quot;.AccordionBody&quot;).hide();
/*For Accordion A*/
$(&quot;#header-A&quot;).click(function() {
/*Checking is sub div is hidden*/
if($(&quot;#body-A&quot;).is(':hidden')) {
$(&quot;#body-A&quot;).show('slow');
} else {
$(&quot;#body-A&quot;).hide('slow');
}
});
/*For Accordion B*/
$(&quot;#header-B&quot;).click(function() {
/*Checking is sub div is hidden*/
if($(&quot;#body-B&quot;).is(':hidden')) {
$(&quot;#body-B&quot;).show('slow');
} else {
$(&quot;#body-B&quot;).hide('slow');
}
});
});
&lt;/script&gt;
&lt;style type=&quot;text/css&quot;&gt;
.AccordionHeader {
background: none repeat scroll 0 0 #0A567D;
color: #FFFFFF;
padding: 10px;
font-family: arial,sans-serif,verdana;
cursor: pointer;
margin-bottom: 1px;
}
.AccordionBody {
background: none repeat scroll 0 0 #bde8f4;
font-family: arial,sans-serif,verdana;
padding: 10px;
}
&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div class=&quot;AccordionHeader&quot; id=&quot;header-A&quot;&gt;About our Company&lt;/div&gt;
&lt;div class=&quot;AccordionBody&quot; id=&quot;body-A&quot;&gt;Welcome to Vijayshanti Infotech. We are a group of highly experienced professionals working together to make your web better.&lt;/div&gt;
&lt;div class=&quot;AccordionHeader&quot; id=&quot;header-B&quot;&gt;Service we Sale&lt;/div&gt;
&lt;div class=&quot;AccordionBody&quot; id=&quot;body-B&quot;&gt;We do provide Responsive Web Application Development, Fancy Web Designing, Graphics, High-end Search Engine Optimization &amp; Digtal Marketing.&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
<p>The post <a href="https://jharaphula.com/example-simple-accordion-jquery-menu/">Example of Simple Accordion Jquery menu without using Jquery UI</a> appeared first on <a href="https://jharaphula.com">OneStop Shop</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://jharaphula.com/example-simple-accordion-jquery-menu/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			<media:content url="https://jharaphula.com/wp-content/uploads/2016/05/jquery-ui.jpg" medium="image" />
	</item>
		<item>
		<title>CSS based Jquery vertical menu with Submenu Example</title>
		<link>https://jharaphula.com/example-jquery-vertical-menu-submenu/</link>
					<comments>https://jharaphula.com/example-jquery-vertical-menu-submenu/#respond</comments>
		
		<dc:creator><![CDATA[Nibedita Panda]]></dc:creator>
		<pubDate>Sat, 14 May 2016 08:18:32 +0000</pubDate>
				<category><![CDATA[Learn JQuery with Examples]]></category>
		<category><![CDATA[CSS in UI designing]]></category>
		<category><![CDATA[Jquery vertical menu]]></category>
		<category><![CDATA[make navigation better]]></category>
		<category><![CDATA[Submenu Example]]></category>
		<category><![CDATA[Web Designing]]></category>
		<guid isPermaLink="false">http://box.jharaphula.com/?p=919</guid>

					<description><![CDATA[<img width="300" height="186" src="https://jharaphula.com/wp-content/uploads/2016/05/vertical-menu-example-300x186.png" class="webfeedsFeaturedVisual wp-post-image" alt="Example of CSS based Jquery vertical menu with Submenu" style="display: block; margin-bottom: 10px; clear: both; max-width: 100%;" decoding="async" loading="lazy" srcset="https://jharaphula.com/wp-content/uploads/2016/05/vertical-menu-example-300x186.png 300w, https://jharaphula.com/wp-content/uploads/2016/05/vertical-menu-example.png 750w" sizes="auto, (max-width: 300px) 100vw, 300px" /><p>During web designing to make navigation better we do implement menu system. Generally there are two type of menu Horizontal menu &#38; Vertical menu. Horizontal...</p>
<p>The post <a href="https://jharaphula.com/example-jquery-vertical-menu-submenu/">CSS based Jquery vertical menu with Submenu Example</a> appeared first on <a href="https://jharaphula.com">OneStop Shop</a>.</p>
]]></description>
										<content:encoded><![CDATA[<img width="300" height="186" src="https://jharaphula.com/wp-content/uploads/2016/05/vertical-menu-example-300x186.png" class="webfeedsFeaturedVisual wp-post-image" alt="Example of CSS based Jquery vertical menu with Submenu" style="display: block; margin-bottom: 10px; clear: both; max-width: 100%;" decoding="async" loading="lazy" srcset="https://jharaphula.com/wp-content/uploads/2016/05/vertical-menu-example-300x186.png 300w, https://jharaphula.com/wp-content/uploads/2016/05/vertical-menu-example.png 750w" sizes="auto, (max-width: 300px) 100vw, 300px" /><p>During web designing to make navigation better we do implement menu system. Generally there are two type of menu <a href="https://jharaphula.com/example-horizontal-bootstrap-responsive-menu/" target="_blank" rel="noopener noreferrer">Horizontal menu</a> &amp; Vertical menu. Horizontal menu&#8217;s are place in header or footer while vertical menu can placed aside the content pan. In this example I designed a jquery vertical menu for my Corporate website. It has tabs like Home, About Us, Service, News &amp; Career. This menu is designed using JQuery &amp; CSS. You can easily configure it as per your requirements.</p>
<p>To design this menu I added UL element in HTML. All the tabs are place in side ul &gt; li. Sub menu&#8217;s are places with nested ul element inside the corresponding li element. During click to expand sub-menus I used JQuery. To select ul &amp; li elements I used CSS selector in JQuery. Using a toggle function I am adding &amp; replacing the class &#8216;enable&#8217;. While the class enable is added to li element, sub-menu for that node is getting visible. Initial all sub-menu&#8217;s are hided.</p>
<p>To run this example, Copy the below file vertical.htm &amp; open with your browser. Here I used JQuery CDN link. Make sure you are running this example in presence of internet. For off-line version please replace the JQuery CDN link with local reference.</p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-2664" src="https://jharaphula.com/wp-content/uploads/2016/05/vertical-menu.png" alt="vertical-menu" width="223" height="422" srcset="https://jharaphula.com/wp-content/uploads/2016/05/vertical-menu.png 223w, https://jharaphula.com/wp-content/uploads/2016/05/vertical-menu-159x300.png 159w" sizes="auto, (max-width: 223px) 100vw, 223px" /></p>
<h3>jquery-vertical-menu.htm</h3>
<pre class="brush: xml; title: ; notranslate">&lt;!DOCTYPE html&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;head&gt;
&lt;title&gt;Vertical Menu with Sub-Menu using JQuery &amp; CSS&lt;/title&gt;
&lt;style type=&quot;text/css&quot;&gt;
#vertical-menu {
float: left;
padding: 0px;
margin: 0px;
width: 210px;
list-style: outside none none;
font-family: arial;
}
#vertical-menu li {
list-style: none;
}
#vertical-menu li a {
display: block;
border-top: 1px solid #eee;
padding: 10px 15px;
background: #197DCB;
text-decoration: none;
color: #ffffff;
}
#vertical-menu li a:hover, #nav li a.enable {
background: #999;
color: #ffffff;
}
#vertical-menu li ul {
background: none repeat scroll 0 0 red;
display: none;
margin: 0;
padding: 0 0 0 15px;
}
#vertical-menu li ul li a {
background: none repeat scroll 0 0 #04bdce;
border-bottom: medium none;
}
&lt;/style&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;https://code.jquery.com/jquery-2.1.3.min.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
$(document).ready(function () {
$('#vertical-menu &gt; li &gt; a').click(function(){
if ($(this).attr('class') != 'enable'){
$('#vertical-menu li ul').slideUp();
$(this).next().slideToggle();
$('#vertical-menu li a').removeClass('enable');
$(this).addClass('enable');
}
});
});
&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;ul id=&quot;vertical-menu&quot;&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Home&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href=&quot;#&quot;&gt;About Us&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Our Mission&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Technology&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Success Stories&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&quot;#&quot;&gt;Services&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;CMS&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;UI Designing&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Logo Designing&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;WordPress&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;SEO Optimization&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;News&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Career&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
<p>The post <a href="https://jharaphula.com/example-jquery-vertical-menu-submenu/">CSS based Jquery vertical menu with Submenu Example</a> appeared first on <a href="https://jharaphula.com">OneStop Shop</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://jharaphula.com/example-jquery-vertical-menu-submenu/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			<media:content url="https://jharaphula.com/wp-content/uploads/2016/05/vertical-menu-example.png" medium="image" />
	</item>
		<item>
		<title>How to Open JQuery Modal Popup with disabled Parent Window?</title>
		<link>https://jharaphula.com/open-jquery-modal-window-popup/</link>
					<comments>https://jharaphula.com/open-jquery-modal-window-popup/#respond</comments>
		
		<dc:creator><![CDATA[Biswabhusan Panda]]></dc:creator>
		<pubDate>Fri, 13 May 2016 18:14:16 +0000</pubDate>
				<category><![CDATA[Learn JQuery with Examples]]></category>
		<category><![CDATA[client side functionality]]></category>
		<category><![CDATA[Jquery Modal Window]]></category>
		<category><![CDATA[Modal Window]]></category>
		<category><![CDATA[Popup with disabled parent Window]]></category>
		<guid isPermaLink="false">http://box.jharaphula.com/?p=730</guid>

					<description><![CDATA[<img width="300" height="185" src="https://jharaphula.com/wp-content/uploads/2016/05/modal-popup-300x185.jpg" class="webfeedsFeaturedVisual wp-post-image" alt="How to open Jquery Modal Window? (Popup with disabled parent Window)" style="display: block; margin-bottom: 10px; clear: both; max-width: 100%;" decoding="async" loading="lazy" srcset="https://jharaphula.com/wp-content/uploads/2016/05/modal-popup-300x185.jpg 300w, https://jharaphula.com/wp-content/uploads/2016/05/modal-popup.jpg 750w" sizes="auto, (max-width: 300px) 100vw, 300px" /><p>Modal Window is like a Popup but During Modal Window parent window get disabled. Many times during Application development we required a modal window. Let&#8217;s...</p>
<p>The post <a href="https://jharaphula.com/open-jquery-modal-window-popup/">How to Open JQuery Modal Popup with disabled Parent Window?</a> appeared first on <a href="https://jharaphula.com">OneStop Shop</a>.</p>
]]></description>
										<content:encoded><![CDATA[<img width="300" height="185" src="https://jharaphula.com/wp-content/uploads/2016/05/modal-popup-300x185.jpg" class="webfeedsFeaturedVisual wp-post-image" alt="How to open Jquery Modal Window? (Popup with disabled parent Window)" style="display: block; margin-bottom: 10px; clear: both; max-width: 100%;" decoding="async" loading="lazy" srcset="https://jharaphula.com/wp-content/uploads/2016/05/modal-popup-300x185.jpg 300w, https://jharaphula.com/wp-content/uploads/2016/05/modal-popup.jpg 750w" sizes="auto, (max-width: 300px) 100vw, 300px" /><p>Modal Window is like a Popup but During Modal Window parent window get disabled. Many times during Application development we required a modal window. Let&#8217;s take an example I want to draw table on click of a button. In this case when user will click on create table button I need to show a modal window where user will provide number of rows &amp; columns. Depending upon these values I need to draw a HTML table. Jquery Modal Window is a client side functionality. It can be done using Advanced Jquery.</p>
<p>Look at the below example here I created a modal window using Jquery. In my page I have a link &#8220;Show Modal Winodw&#8221; on click of this I am calling a Jquery function tableDialog(). Table Dialog modal window has two buttons OK &amp; Cancel. On click event of OK button I kept blank. On cancel button event I am closing the window.</p>
<p>Dialog is a Jquery UI method. To tblDialog div here I am applying Jquery dialog method. By passing width, resizable, buttons &amp; autoOpen I am configuring my modal window. In side dialog by declaring modal: true I am showing the div (tblDialog) as a modal window else it will act like a popup. For default height of my modal window I added a css class to tblDialog div.</p>
<p>To run this program copy the below code into a notepad file. Save it as a html file. Before run the html file make sure you are with Internet Connectivity. Because here I used CDN link for Jquery &amp; Jquery UI libraries.</p>
<h2>JQuery Modal Window with disabled parent Window</h2>
<pre class="brush: xml; title: ; notranslate">&lt;!Doctype html&gt;
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;How to Open JQuery Modal Popup?&lt;/title&gt;
&lt;script src=&quot;http://code.jquery.com/jquery-1.9.1.js&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;http://code.jquery.com/ui/1.10.2/jquery-ui.js&quot;&gt;&lt;/script&gt;
&lt;link rel=&quot;stylesheet&quot; href=&quot;http://code.jquery.com/ui/1.9.1/themes/base/jquery-ui.css&quot; /&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
var tableDialog = function () {
$(&quot;#tblDialog&quot;).dialog({
dialogClass: &quot;no-close&quot;,
resizable: false,
width: &quot;540px&quot;,
modal: true,
buttons: [{
text: &quot;Ok&quot;,
click: function () {
/*Write Code for OK button*/
}
}, {
text: &quot;Cancel&quot;,
click: function () {
/*On click of close button closing dialog*/
$(this).dialog(&quot;close&quot;);
}
}],
autoOpen: true
});
};
&lt;/script&gt;
&lt;style type=&quot;text/css&quot;&gt;
#tblDialog {
height:100px !important;
}
&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div id=&quot;links&quot;&gt;
&lt;a onclick=&quot;tableDialog();&quot;&gt;Show Modal Window&lt;/a&gt;
&lt;div id=&quot;tblDialog&quot; title=&quot;Jquery Modal Window&quot; style=&quot;display: none;&quot;&gt;
This is a Sample Modal Window using Jquery.
&lt;/div&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
<p>The post <a href="https://jharaphula.com/open-jquery-modal-window-popup/">How to Open JQuery Modal Popup with disabled Parent Window?</a> appeared first on <a href="https://jharaphula.com">OneStop Shop</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://jharaphula.com/open-jquery-modal-window-popup/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			<media:content url="https://jharaphula.com/wp-content/uploads/2016/05/modal-popup.jpg" medium="image" />
	</item>
		<item>
		<title>Jquery function to Generate Random font Size &#038; Color Anchor Tags</title>
		<link>https://jharaphula.com/jquery-function-to-generate-random-font-size-color-anchor-tags/</link>
					<comments>https://jharaphula.com/jquery-function-to-generate-random-font-size-color-anchor-tags/#comments</comments>
		
		<dc:creator><![CDATA[Biswabhusan Panda]]></dc:creator>
		<pubDate>Fri, 13 May 2016 18:11:54 +0000</pubDate>
				<category><![CDATA[Learn JQuery with Examples]]></category>
		<category><![CDATA[Color Anchor Tags]]></category>
		<category><![CDATA[Generate Random font Size]]></category>
		<category><![CDATA[Jquery Function]]></category>
		<guid isPermaLink="false">http://box.jharaphula.com/?p=728</guid>

					<description><![CDATA[<img width="300" height="196" src="https://jharaphula.com/wp-content/uploads/2016/05/random-string-1-300x196.png" class="webfeedsFeaturedVisual wp-post-image" alt="Jquery function to Generate Random font Size &amp; Color Anchor Tags" style="display: block; margin-bottom: 10px; clear: both; max-width: 100%;" decoding="async" loading="lazy" srcset="https://jharaphula.com/wp-content/uploads/2016/05/random-string-1-300x196.png 300w, https://jharaphula.com/wp-content/uploads/2016/05/random-string-1-182x120.png 182w, https://jharaphula.com/wp-content/uploads/2016/05/random-string-1-106x70.png 106w, https://jharaphula.com/wp-content/uploads/2016/05/random-string-1.png 750w" sizes="auto, (max-width: 300px) 100vw, 300px" /><p>While displaying many links together to make the panel more attractive we want to add text effects like random font size and colors to the...</p>
<p>The post <a href="https://jharaphula.com/jquery-function-to-generate-random-font-size-color-anchor-tags/">Jquery function to Generate Random font Size &#038; Color Anchor Tags</a> appeared first on <a href="https://jharaphula.com">OneStop Shop</a>.</p>
]]></description>
										<content:encoded><![CDATA[<img width="300" height="196" src="https://jharaphula.com/wp-content/uploads/2016/05/random-string-1-300x196.png" class="webfeedsFeaturedVisual wp-post-image" alt="Jquery function to Generate Random font Size &amp; Color Anchor Tags" style="display: block; margin-bottom: 10px; clear: both; max-width: 100%;" decoding="async" loading="lazy" srcset="https://jharaphula.com/wp-content/uploads/2016/05/random-string-1-300x196.png 300w, https://jharaphula.com/wp-content/uploads/2016/05/random-string-1-182x120.png 182w, https://jharaphula.com/wp-content/uploads/2016/05/random-string-1-106x70.png 106w, https://jharaphula.com/wp-content/uploads/2016/05/random-string-1.png 750w" sizes="auto, (max-width: 300px) 100vw, 300px" /><p>While displaying many links together to make the panel more attractive we want to add text effects like random font size and colors to the anchor tags. Mannually it can be done by using Style sheet but it is more programmer friendly if we use programming technique to decorate the links. This practice help in reuse of codes.</p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-3087" src="https://jharaphula.com/wp-content/uploads/2016/05/decorating-anchor-tag.png" alt="decorating-anchor-tag" width="929" height="197" srcset="https://jharaphula.com/wp-content/uploads/2016/05/decorating-anchor-tag.png 929w, https://jharaphula.com/wp-content/uploads/2016/05/decorating-anchor-tag-300x64.png 300w" sizes="auto, (max-width: 929px) 100vw, 929px" /></p>
<p>In the below example I have many links inside a div with div id &#8220;links&#8221;. Using Jquery in document.ready() method I am locating all the links inside the div &amp; applying random font size &amp; color to each anchor tags. randomNumberGenerator() is js function which generates random number for font size in between the min &amp; max values. To apply style over anchor tags I am using css() method from Jquery. Look at the example below.</p>
<p>To run this example Copy the code to a Notepad file &amp; Save it as a html file. Here to refer Jquery library I used Jquery CDN link. While running this app be sure you are with Internet Connectivity.</p>
<h3>Example to Generate Random font Size &amp; Color</h3>
<pre class="brush: xml; title: ; notranslate">&lt;!Doctype html&gt;
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Tag like Anchor Tags using Random Font Size &amp; Color&lt;/title&gt;
&lt;script src=&quot;http://code.jquery.com/jquery-1.10.2.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
$(document).ready(function() {

/*Colors you need to add for your anchor tags*/
var colors = ['red', 'green', 'blue', 'orange', 'gray'];

/*Minimum &amp; Maximum font Size*/
var minFontSize = 10;
var maxFontSize = 40;

/*Finding all the links inside a Div*/
$('#links').find('a').each(function(e) {
/*Applying font size*/
$(this).css(&quot;fontSize&quot;, randomNumberGenerator(minFontSize, maxFontSize));
/*Applying font color*/
$(this).css(&quot;color&quot;, colors[Math.floor(Math.random() * colors.length)]);
});

/*Random Number Generator function*/
function randomNumberGenerator(min,max)
{
return Math.floor(Math.random()*(max-min+1)+min);
}
});
&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div id=&quot;links&quot;&gt;
&lt;a href=&quot;https://jharaphula.com/category/health-tips&quot; target=&quot;_blank&quot;&gt;Health Tips&lt;/a&gt;, &lt;a href=&quot;https://jharaphula.com/category/beauty-tips&quot; target=&quot;_blank&quot;&gt;Beauty Tips&lt;/a&gt;, &lt;a href=&quot;https://jharaphula.com/category/celebrity&quot; target=&quot;_blank&quot;&gt;Celebrity&lt;/a&gt;, &lt;a href=&quot;https://jharaphula.com/category/kids&quot; target=&quot;_blank&quot;&gt;Kids&lt;/a&gt;, &lt;a href=&quot;https://jharaphula.com/category/recipes&quot; target=&quot;_blank&quot;&gt;Recipes&lt;/a&gt;, &lt;a href=&quot;https://jharaphula.com/tag/effective-tips&quot; target=&quot;_blank&quot;&gt;Effective Tips&lt;/a&gt;, &lt;a href=&quot;https://jharaphula.com/category/blog&quot; target=&quot;_blank&quot;&gt;Our Blog&lt;/a&gt;, &lt;a href=&quot;https://jharaphula.com/category/women&quot; target=&quot;_blank&quot;&gt;Women&lt;/a&gt;, &lt;a href=&quot;https://jharaphula.com/tag/how-to&quot;  target=&quot;_blank&quot;&gt;How to&lt;/a&gt;, &lt;a href=&quot;https://jharaphula.com/tag/skin-care-tips&quot; target=&quot;_blank&quot;&gt;Skin Care Tips&lt;/a&gt;, &lt;a href=&quot;https://jharaphula.com/category/business&quot; target=&quot;_blank&quot;&gt;Business&lt;/a&gt;, &lt;a href=&quot;https://jharaphula.com/category/career&quot; target=&quot;_blank&quot;&gt;Career&lt;/a&gt;, &lt;a href=&quot;https://jharaphula.com/tag/breast-care&quot; target=&quot;_blank&quot;&gt;Breast Care&lt;/a&gt;, &lt;a href=&quot;https://jharaphula.com/category/real-estate&quot;&gt;Real Estate&lt;/a&gt;, &lt;a href=&quot;https://jharaphula.com/category/romance&quot;&gt;Romance&lt;/a&gt;, &lt;a href=&quot;https://jharaphula.com/category/seo-tips&quot; target=&quot;_blank&quot;&gt;SEO Tips&lt;/a&gt;, &lt;a href=&quot;https://jharaphula.com/tag/loan&quot; target=&quot;_blank&quot;&gt;Loan&lt;/a&gt;, &lt;a href=&quot;https://jharaphula.com/tag/makeup-tips&quot; target=&quot;_blank&quot;&gt;Makeup Tips&lt;/a&gt;, &lt;a href=&quot;https://jharaphula.com/tag/couples-guide&quot; target=&quot;_blank&quot;&gt;Couples Guide&lt;/a&gt;, &lt;a href=&quot;https://jharaphula.com/tag/high-pr-backlinks&quot; target=&quot;_blank&quot;&gt;High PR Backlinks&lt;/a&gt;, &lt;a href=&quot;https://jharaphula.com/tag/home-remedy&quot; target=&quot;_blank&quot;&gt;Home Remedy&lt;/a&gt;,&lt;br /&gt;&lt;a href=&quot;https://jharaphula.com/tag/hosting&quot; target=&quot;_blank&quot;&gt;Hosting&lt;/a&gt;, &lt;a href=&quot;https://jharaphula.com/tag/insurance&quot; target=&quot;_blank&quot;&gt;Insurance&lt;/a&gt;, &lt;a href=&quot;https://jharaphula.com/tag/interview-questions&quot; target=&quot;_blank&quot;&gt;Interview Questions&lt;/a&gt;, &lt;a href=&quot;https://jharaphula.com/category/stories&quot; target=&quot;_blank&quot;&gt;Stories&lt;/a&gt;, &lt;a href=&quot;https://jharaphula.com/category/programming&quot; target=&quot;_blank&quot;&gt;Programming&lt;/a&gt;, &lt;a href=&quot;https://jharaphula.com/tag/marketing&quot; target=&quot;_blank&quot;&gt;Marketing&lt;/a&gt;, &lt;a href=&quot;https://jharaphula.com/tag/personal-computer&quot; target=&quot;_blank&quot;&gt;Personal Computer&lt;/a&gt;, &lt;a href=&quot;https://jharaphula.com/tag/pregnancy&quot; target=&quot;_blank&quot;&gt;Pregnancy&lt;/a&gt;
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
<p>Here I am using very simple logics to achive the required functionalities. Colors is a Javascript array which contains verious colors as per the need. You can add n number of colors to this array. 2 variables are defiend for font size. minFontSize stores the most smaller font size while maxFontSize stores the largest. To generate random font size in-between min and max font size values here I wrote a js function randomNumberGenerator(min,max).</p>
<p>Next what more I did is using jquery find function I am finding all anchor tags inside the the div #links. Then inside the loop for each item I am applying font size and color.</p>
<p>Inside randomNumberGenerator function I am using math.floor and math.random methods to generate random number. To bring Jquery platform here I am using Jquery CDN link.</p>
<p>The post <a href="https://jharaphula.com/jquery-function-to-generate-random-font-size-color-anchor-tags/">Jquery function to Generate Random font Size &#038; Color Anchor Tags</a> appeared first on <a href="https://jharaphula.com">OneStop Shop</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://jharaphula.com/jquery-function-to-generate-random-font-size-color-anchor-tags/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			<media:content url="https://jharaphula.com/wp-content/uploads/2016/05/random-string-1.png" medium="image" />
	</item>
		<item>
		<title>Jquery Email Validation using Regular Expression</title>
		<link>https://jharaphula.com/jquery-email-validation-regular-expression/</link>
					<comments>https://jharaphula.com/jquery-email-validation-regular-expression/#respond</comments>
		
		<dc:creator><![CDATA[Nibedita Panda]]></dc:creator>
		<pubDate>Fri, 13 May 2016 17:32:50 +0000</pubDate>
				<category><![CDATA[Learn JQuery with Examples]]></category>
		<category><![CDATA[CDN links]]></category>
		<category><![CDATA[Jquery Email Validation]]></category>
		<category><![CDATA[Regular Expression]]></category>
		<guid isPermaLink="false">http://box.jharaphula.com/?p=705</guid>

					<description><![CDATA[<img width="300" height="194" src="https://jharaphula.com/wp-content/uploads/2016/05/email-validation-300x194.jpg" class="webfeedsFeaturedVisual wp-post-image" alt="Jquery Email Validation using Regular Expression" style="display: block; margin-bottom: 10px; clear: both; max-width: 100%;" decoding="async" loading="lazy" srcset="https://jharaphula.com/wp-content/uploads/2016/05/email-validation-300x194.jpg 300w, https://jharaphula.com/wp-content/uploads/2016/05/email-validation-294x190.jpg 294w, https://jharaphula.com/wp-content/uploads/2016/05/email-validation-106x70.jpg 106w, https://jharaphula.com/wp-content/uploads/2016/05/email-validation.jpg 750w" sizes="auto, (max-width: 300px) 100vw, 300px" /><p>In internet Email ID acts like an identity token. Whether you do register for a Job site or Forum a valid Email ID is mandatory....</p>
<p>The post <a href="https://jharaphula.com/jquery-email-validation-regular-expression/">Jquery Email Validation using Regular Expression</a> appeared first on <a href="https://jharaphula.com">OneStop Shop</a>.</p>
]]></description>
										<content:encoded><![CDATA[<img width="300" height="194" src="https://jharaphula.com/wp-content/uploads/2016/05/email-validation-300x194.jpg" class="webfeedsFeaturedVisual wp-post-image" alt="Jquery Email Validation using Regular Expression" style="display: block; margin-bottom: 10px; clear: both; max-width: 100%;" decoding="async" loading="lazy" srcset="https://jharaphula.com/wp-content/uploads/2016/05/email-validation-300x194.jpg 300w, https://jharaphula.com/wp-content/uploads/2016/05/email-validation-294x190.jpg 294w, https://jharaphula.com/wp-content/uploads/2016/05/email-validation-106x70.jpg 106w, https://jharaphula.com/wp-content/uploads/2016/05/email-validation.jpg 750w" sizes="auto, (max-width: 300px) 100vw, 300px" /><p>In internet Email ID acts like an identity token. Whether you do register for a Job site or Forum a valid Email ID is mandatory. During registration process there is a possibility that user can provide invalid Email ID. So to prevent spam we use Email Validation. In Web Technology Email validation can be done using both Client &amp; Server side scripts. But if we will look into performance it is more better to use client resources to validate an email. As you know <a href="https://jharaphula.com/category/programming-solutions/learn-jquery-with-examples/" target="_blank" rel="noopener noreferrer">jquery is one of the most powerful Client-side scripting language</a>. In this demo app I created a Jquery Email Validation using Regular Expression.</p>
<p>Look at the code below here in HTML body part I have a input box with a submit button. Onclick of submit button I am calling a jquery function validEmail($email) inside the jquery document.ready() method. This function accepts email id as a parameter. To verify the email id inside the validEmail() function I am using regular expression with jquery test method. You can do the same using jquery match method too.</p>
<p>To run the below example. Copy the Codes to a notepad file. Save it as a HTML file. Then Open it in your browser. Here to refer jquery library file I am using CDN link. Make sure while running this demo app you are with internet connectivity.</p>
<h3>jquery-email-validation.htm</h3>
<pre class="brush: xml; title: ; notranslate">&lt;!Doctype html&gt;
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Jquery Email Validation using Regular Expression&lt;/title&gt;
&lt;script src=&quot;http://code.jquery.com/jquery-1.10.2.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
$(document).ready(function() {
/*Email Validation Function using Regular Expression*/
function validEmail($email) {
var emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/;
if( !emailReg.test($email) ) {
alert('Invalid Email ID.');
} else {
alert('Valid Email ID.');
}
}
/*Submit Button Click event using Jquery*/
$(&quot;#btnSubmit&quot;).click(function() {
var email = $('#txtEmail').val().trim();
if (email) {
validEmail(email);
}
});
});
&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;input type=&quot;text&quot; id=&quot;txtEmail&quot; /&gt;
&lt;button id=&quot;btnSubmit&quot;&gt;Submit the Form&lt;/button&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
<p>The post <a href="https://jharaphula.com/jquery-email-validation-regular-expression/">Jquery Email Validation using Regular Expression</a> appeared first on <a href="https://jharaphula.com">OneStop Shop</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://jharaphula.com/jquery-email-validation-regular-expression/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			<media:content url="https://jharaphula.com/wp-content/uploads/2016/05/email-validation.jpg" medium="image" />
	</item>
		<item>
		<title>One Div to an another Div drag and drop Jquery Example</title>
		<link>https://jharaphula.com/drag-and-drop-jquery-example/</link>
					<comments>https://jharaphula.com/drag-and-drop-jquery-example/#respond</comments>
		
		<dc:creator><![CDATA[Nibedita Panda]]></dc:creator>
		<pubDate>Fri, 13 May 2016 17:30:51 +0000</pubDate>
				<category><![CDATA[Learn JQuery with Examples]]></category>
		<category><![CDATA[Div drag and drop]]></category>
		<category><![CDATA[Div to an another Div]]></category>
		<category><![CDATA[drag and drop Jquery Example]]></category>
		<guid isPermaLink="false">http://box.jharaphula.com/?p=703</guid>

					<description><![CDATA[<img width="300" height="134" src="https://jharaphula.com/wp-content/uploads/2016/05/drag-n-drop-300x134.png" class="webfeedsFeaturedVisual wp-post-image" alt="One Div to an another Div drag and drop Jquery Example" style="display: block; margin-bottom: 10px; clear: both; max-width: 100%;" decoding="async" loading="lazy" srcset="https://jharaphula.com/wp-content/uploads/2016/05/drag-n-drop-300x134.png 300w, https://jharaphula.com/wp-content/uploads/2016/05/drag-n-drop.png 855w" sizes="auto, (max-width: 300px) 100vw, 300px" /><p>Drag n Drop is a user interface mechanism using which user can copy, reorder or deletion of items through the use of mouse. To drag...</p>
<p>The post <a href="https://jharaphula.com/drag-and-drop-jquery-example/">One Div to an another Div drag and drop Jquery Example</a> appeared first on <a href="https://jharaphula.com">OneStop Shop</a>.</p>
]]></description>
										<content:encoded><![CDATA[<img width="300" height="134" src="https://jharaphula.com/wp-content/uploads/2016/05/drag-n-drop-300x134.png" class="webfeedsFeaturedVisual wp-post-image" alt="One Div to an another Div drag and drop Jquery Example" style="display: block; margin-bottom: 10px; clear: both; max-width: 100%;" decoding="async" loading="lazy" srcset="https://jharaphula.com/wp-content/uploads/2016/05/drag-n-drop-300x134.png 300w, https://jharaphula.com/wp-content/uploads/2016/05/drag-n-drop.png 855w" sizes="auto, (max-width: 300px) 100vw, 300px" /><p>Drag n Drop is a user interface mechanism using which user can copy, reorder or deletion of items through the use of mouse. To drag you need to select the element then click and hold the element using your mouse pointer. Drag it to the container area and release the mouse button to drop the element inside.</p>
<p>Many times during application development to make our application much more user friendly we required to implement drag and drop facility. Whether the matter of Dashboard or Datagrid using drag and drop we can make to page more user friendly. Drag and Drop can be done using both server-side and client-side scripting. For high performance webpages or apps its wise to implement drag and drop using Client-side Scripting. This practice reduces network load.</p>
<p>JQuery is a Javascript library. To implement drag and drop using Javascript we must need to write some 40 to 50 lines of Code. While using JQuery in-built methods we can do the same in 5 to 6 lines of Code. In the below demo app I have two panels left panel &amp; right panel. Left panel is a div which is called toolbar. Right panel is an another div called Container. What I need is from left pan toolbar I need to drag nodes to container area. While dragging I need to generate cloning for the draggable element over Container area. Look at this drag and drop <a href="https://jharaphula.com/category/programming-solutions/learn-jquery-with-examples/" target="_blank" rel="noopener noreferrer">Jquery example</a> how I implemented the things using JQuery draggable method.</p>
<p>To run the below demo app copy the codes to a Notepad file. Save it as a HTML file. Then open the file in your browser.</p>
<h2>Drag and Drop JQuery Example</h2>
<pre class="brush: xml; title: ; notranslate">&lt;!Doctype html&gt;
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Drag n Drop from a Div to an another Div using Jquery&lt;/title&gt;
&lt;link rel=&quot;stylesheet&quot; href=&quot;http://code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css&quot;&gt;
&lt;script src=&quot;http://code.jquery.com/jquery-1.10.2.js&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;http://code.jquery.com/ui/1.11.2/jquery-ui.js&quot;&gt;&lt;/script&gt;
&lt;style type=&quot;text/css&quot;&gt;
#toolbar { float:left; border-style:solid; border-color:#000000; border-width:thin; width: 120px; height: 350px; margin-right:3px; }
#container { float:left; border-style:solid; border-color:#000000; border-width:thin; width:800px; height:540px; }
#dragImage { width:64px; height:64px; }
&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div id=&quot;toolbar&quot;&gt;
&lt;div class=&quot;tbutton&quot;&gt;&lt;img id=&quot;dragImage&quot; src=&quot;http://www.html5canvastutorials.com/demos/assets/yoda.jpg&quot; /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div id=&quot;container&quot;&gt;&lt;/div&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
$(&quot;#dragImage&quot;).draggable({ helper: &quot;clone&quot; });
$(&quot;#container&quot;).droppable({
drop: function(event, ui) {
$(&quot;#container&quot;).append(&quot;&lt;img id='dragImage' src='http://www.html5canvastutorials.com/demos/assets/yoda.jpg' /&gt;&quot;);
}
});
&lt;/script&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
<p>In the above example I used CDN files for Jquery and Jquery UI library. Toolbar div contains an image as a node. Container is an another div where I need to drag the image. To make a clone here I used <span style="color: brown;">$(&#8220;#dragImage&#8221;).draggable({ helper: &#8220;clone&#8221; });</span>. To drop the draggable node in container area for container area I used droppable method with drop event. In drop event I am appending the draggable image to container area using append method. JQuery draggable method supported by all the major web browsers like Google Chrome, Mozila Firefox and Safari.</p>
<h2>One Div to an another Div using JQuery draggable() method</h2>
<p>The JQuery draggable() method has 2 forms $(selector, context).draggable (options); and $(selector, context).draggable (&#8220;action&#8221;, [params]);. There 4 different options (addClass, axis, containment and opacity) you can use with this method. Similar to draggable method the droppable() method has also 2 forms $(selector, context).droppable (options), $(selector, context).droppable (&#8220;action&#8221;, params). There 3 different options (accept, addClass and disable) you can use with this method.</p>
<h2>Othe API</h2>
<p>From Product Gallery to your Mail Box drag and drop feature creates better user experience. This feature saves user time. For an example in your gmail while grouping some selected mail under a new label drag and drop feature works awesome. After JQuery we can implement drag and drop using other technologies like HTML5 and pure Javascript. Now HTML5 comes with drag n drop API. Look at the sample code.</p>
<pre class="brush: xml; title: ; notranslate">&lt;!DOCTYPE HTML&gt;
&lt;html&gt;
&lt;head&gt;
&lt;style&gt;
#divdd { width: 340px; height: 80px; padding: 10px; border: 1px solid #aaaaaa; }
&lt;/style&gt;
&lt;script&gt;
function allowDrop(ev) {
ev.preventDefault();
}

function drag(ev) {
ev.dataTransfer.setData(&quot;text&quot;, ev.target.id);
}

function drop(ev) {
ev.preventDefault();
var data = ev.dataTransfer.getData(&quot;text&quot;);
ev.target.appendChild(document.getElementById(data));
}
&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div id=&quot;divdd&quot; ondrop=&quot;drop(event)&quot; ondragover=&quot;allowDrop(event)&quot;&gt;&lt;/div&gt;
&lt;img id=&quot;dragdd&quot; src=&quot;img_jharaphula.gif&quot; draggable=&quot;true&quot; ondragstart=&quot;drag(event)&quot; width=&quot;330&quot; height=&quot;60&quot;&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
<p>The post <a href="https://jharaphula.com/drag-and-drop-jquery-example/">One Div to an another Div drag and drop Jquery Example</a> appeared first on <a href="https://jharaphula.com">OneStop Shop</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://jharaphula.com/drag-and-drop-jquery-example/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			<media:content url="https://jharaphula.com/wp-content/uploads/2016/05/drag-n-drop.png" medium="image" />
	</item>
		<item>
		<title>How to read JSON file data in JQuery? &#8211; GetJSON Example</title>
		<link>https://jharaphula.com/read-json-data-jquery-getjson-example/</link>
					<comments>https://jharaphula.com/read-json-data-jquery-getjson-example/#respond</comments>
		
		<dc:creator><![CDATA[Nibedita Panda]]></dc:creator>
		<pubDate>Fri, 13 May 2016 14:53:37 +0000</pubDate>
				<category><![CDATA[Learn JQuery with Examples]]></category>
		<category><![CDATA[data in JQuery]]></category>
		<category><![CDATA[GetJSON Example]]></category>
		<category><![CDATA[How to read JSON]]></category>
		<category><![CDATA[JavaScript Object Notation]]></category>
		<guid isPermaLink="false">http://box.jharaphula.com/?p=629</guid>

					<description><![CDATA[<img width="300" height="182" src="https://jharaphula.com/wp-content/uploads/2016/05/jquery-ajax-method-300x182.jpg" class="webfeedsFeaturedVisual wp-post-image" alt="How to read JSON file data in JQuery? - GetJSON Example" style="display: block; margin-bottom: 10px; clear: both; max-width: 100%;" decoding="async" loading="lazy" srcset="https://jharaphula.com/wp-content/uploads/2016/05/jquery-ajax-method-300x182.jpg 300w, https://jharaphula.com/wp-content/uploads/2016/05/jquery-ajax-method.jpg 750w" sizes="auto, (max-width: 300px) 100vw, 300px" /><p>Compare to XML JSON is a lightweight &#38; tag free data exchange format. JSON is language independent. JSON stands for JavaScript Object Notation. Many times...</p>
<p>The post <a href="https://jharaphula.com/read-json-data-jquery-getjson-example/">How to read JSON file data in JQuery? &#8211; GetJSON Example</a> appeared first on <a href="https://jharaphula.com">OneStop Shop</a>.</p>
]]></description>
										<content:encoded><![CDATA[<img width="300" height="182" src="https://jharaphula.com/wp-content/uploads/2016/05/jquery-ajax-method-300x182.jpg" class="webfeedsFeaturedVisual wp-post-image" alt="How to read JSON file data in JQuery? - GetJSON Example" style="display: block; margin-bottom: 10px; clear: both; max-width: 100%;" decoding="async" loading="lazy" srcset="https://jharaphula.com/wp-content/uploads/2016/05/jquery-ajax-method-300x182.jpg 300w, https://jharaphula.com/wp-content/uploads/2016/05/jquery-ajax-method.jpg 750w" sizes="auto, (max-width: 300px) 100vw, 300px" /><p>Compare to XML JSON is a lightweight &amp; tag free data exchange format. JSON is language independent. JSON stands for JavaScript Object Notation. Many times during programming we found some places where we need to store static data. In this case <a href="https://jharaphula.com/learn-json-tutorial-for-beginners/" target="_blank" rel="noopener noreferrer">JSON is very programmer friendly</a>. Let&#8217;s talk about we want to display the list of Global Banks. To do this there are several ways. Here to present you a demo I stored bank related data&#8217;s in a js file using JSON format. To read data from JSON here I am with getJSON Example. Look at the Code below.</p>
<h3>GetJSON-Example.htm</h3>
<pre class="brush: xml; title: ; notranslate">&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;How to read JSON file data in JQuery?&lt;/title&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.3.0/jquery.min.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
$(function()
{
$(document).ready(function()
{
$.getJSON(&quot;bank-records.js&quot;,function(data)
{
$.each(data.banks, function(i,data)
{
document.write(data.bankName + &quot;&lt;br /&gt;&quot; + data.title + &quot;&lt;br /&gt;&lt;br /&gt;&quot;);
});
}
);
return false;
});
});
&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;&lt;/body&gt;
&lt;/html&gt;</pre>
<h3>bank-records.js</h3>
<pre class="brush: jscript; title: ; notranslate">{&quot;banks&quot;:
[
{
'bankName': 'ICICI Bank',
'title': 'Personal Banking Services'
},
{
'bankName': 'SBI Bank',
'title': 'Safe Banking With SBI'
},
{
'bankName': 'HDFC Bank',
'title': 'Personal Banking Services'
}
]
}</pre>
<p>To run the above program Create a folder. Copy the above index.html &amp; bank-records.js file in the same folder. Open index.html. For Jquery here I used CDN link. Make sure to run this program you are with Internet connectivity or you have to refer a local Jquery library.</p>
<p>The post <a href="https://jharaphula.com/read-json-data-jquery-getjson-example/">How to read JSON file data in JQuery? &#8211; GetJSON Example</a> appeared first on <a href="https://jharaphula.com">OneStop Shop</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://jharaphula.com/read-json-data-jquery-getjson-example/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			<media:content url="https://jharaphula.com/wp-content/uploads/2016/05/jquery-ajax-method.jpg" medium="image" />
	</item>
		<item>
		<title>Jquery Ajax Example using Get and Post Methods</title>
		<link>https://jharaphula.com/jquery-ajax-example-get-post-methods/</link>
					<comments>https://jharaphula.com/jquery-ajax-example-get-post-methods/#respond</comments>
		
		<dc:creator><![CDATA[Biswabhusan Panda]]></dc:creator>
		<pubDate>Thu, 12 May 2016 16:48:38 +0000</pubDate>
				<category><![CDATA[Learn JQuery with Examples]]></category>
		<category><![CDATA[Ajax Example]]></category>
		<category><![CDATA[Ajax Get method]]></category>
		<category><![CDATA[Ajax Post Method]]></category>
		<category><![CDATA[Jquery Ajax]]></category>
		<guid isPermaLink="false">http://box.jharaphula.com/?p=427</guid>

					<description><![CDATA[<img width="300" height="180" src="https://jharaphula.com/wp-content/uploads/2016/05/jquery-ajax-method-1-300x180.jpg" class="webfeedsFeaturedVisual wp-post-image" alt="Jquery Ajax Example using Get and Post Methods" style="display: block; margin-bottom: 10px; clear: both; max-width: 100%;" decoding="async" loading="lazy" srcset="https://jharaphula.com/wp-content/uploads/2016/05/jquery-ajax-method-1-300x180.jpg 300w, https://jharaphula.com/wp-content/uploads/2016/05/jquery-ajax-method-1.jpg 750w" sizes="auto, (max-width: 300px) 100vw, 300px" /><p>In Client Server architecture get &#38; post methods are well popular for response &#38; request mechanism. During development phases many times we required to send...</p>
<p>The post <a href="https://jharaphula.com/jquery-ajax-example-get-post-methods/">Jquery Ajax Example using Get and Post Methods</a> appeared first on <a href="https://jharaphula.com">OneStop Shop</a>.</p>
]]></description>
										<content:encoded><![CDATA[<img width="300" height="180" src="https://jharaphula.com/wp-content/uploads/2016/05/jquery-ajax-method-1-300x180.jpg" class="webfeedsFeaturedVisual wp-post-image" alt="Jquery Ajax Example using Get and Post Methods" style="display: block; margin-bottom: 10px; clear: both; max-width: 100%;" decoding="async" loading="lazy" srcset="https://jharaphula.com/wp-content/uploads/2016/05/jquery-ajax-method-1-300x180.jpg 300w, https://jharaphula.com/wp-content/uploads/2016/05/jquery-ajax-method-1.jpg 750w" sizes="auto, (max-width: 300px) 100vw, 300px" /><p>In Client Server architecture get &amp; post methods are well popular for response &amp; request mechanism. During development phases many times we required to send or receive data in between client &amp; server. In Jquery to deal with the above situations there are two Ajax methods are introduced. Get &amp; Post. Using get method we can receive the response from server in client &amp; using post method we can post our client side data to the server. In below check our Jquery Ajax Example.</p>
<h3>Ajax Get method</h3>
<p>Using Jquery $.get() method we can fetch the data from server. Syntax used for Jquery get method is as below.</p>
<pre class="brush: jscript; title: ; notranslate">$.get(url, callback);</pre>
<p>URL specify the path from which server page you want to receive data in client end. Let us have an asp page demo_get.asp. In this page I added the following lines.</p>
<pre class="brush: vb; title: ; notranslate">&lt;%
response.write(“This line is to test get method in Jquery”);
%&gt;</pre>
<p>What we want is on a button click we need to show the above server response in client end using Jquery ajax get method. Look at the example below how to do this.</p>
<pre class="brush: jscript; title: ; notranslate">$(“#btnGet”).click(function() {
$.get(“demo_get.asp”, function(data, status) {
alert(&quot;Response: &quot; + data + &quot;\nRequest Status: &quot; + status);
});
});</pre>
<h3>Ajax Post Method</h3>
<p>Generally HTTP Post method used to send <a href="https://jharaphula.com/database-basics-terminologies-definition/" rel="noopener noreferrer" target="_blank">data</a> from client to server. Compare to get method post method is more secured. During post method control data moves with form. Jquery provide $.post() method to send client data to the server. Syntax used for Jquery post method is as below.</p>
<pre class="brush: jscript; title: ; notranslate">$.post(url, data, callback);</pre>
<p>URL is the path to which server page you want to send client data. Let us have a button with id btnPost. What we want is using Jquery post method we will send some sample data to demo_post.asp server page. Let&#8217;s look at the button click code how to send client data using post method.</p>
<pre class="brush: jscript; title: ; notranslate">$(“#btnPost”).click(function() {
$.post(“demo_post.asp”,
{
name: “Biswabhusan”,
designation: “Team Lead”
},
function(data, status) {
alert(&quot;Response: &quot; + data + &quot;\nRequest Status: &quot; + status);
});
});</pre>
<p>Using the above our data name &amp; designation post to the server page demo_post.asp. Now look at the below code how to retrieve these data in server page demo_post.asp.</p>
<pre class="brush: vb; title: ; notranslate">&lt;%
dim emp_name, emp_designation
emp_name=Request.Form(&quot;name&quot;)
emp_designation=Request.Form(&quot;designation&quot;)
Response.Write(&quot;Hi &quot; &amp; emp_name &amp; &quot;. &quot;)
Response.Write(&quot;You are a &quot; &amp; emp_designation &amp; &quot;.&quot;)
%&gt;</pre>
<p>Jquery get &amp; post methods are Ajax based. During server &amp; client communication using these methods it not required the total page refresh.</p>
<p>The post <a href="https://jharaphula.com/jquery-ajax-example-get-post-methods/">Jquery Ajax Example using Get and Post Methods</a> appeared first on <a href="https://jharaphula.com">OneStop Shop</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://jharaphula.com/jquery-ajax-example-get-post-methods/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			<media:content url="https://jharaphula.com/wp-content/uploads/2016/05/jquery-ajax-method-1.jpg" medium="image" />
	</item>
		<item>
		<title>Example of Callback Function in JQuery</title>
		<link>https://jharaphula.com/example-of-callback-function-in-jquery/</link>
					<comments>https://jharaphula.com/example-of-callback-function-in-jquery/#respond</comments>
		
		<dc:creator><![CDATA[Biswabhusan Panda]]></dc:creator>
		<pubDate>Tue, 10 May 2016 13:33:00 +0000</pubDate>
				<category><![CDATA[Learn JQuery with Examples]]></category>
		<category><![CDATA[Callback Function]]></category>
		<category><![CDATA[Function in JQuery]]></category>
		<guid isPermaLink="false">http://box.jharaphula.com/?p=107</guid>

					<description><![CDATA[<img width="300" height="198" src="https://jharaphula.com/wp-content/uploads/2016/05/callback-function-300x198.jpg" class="webfeedsFeaturedVisual wp-post-image" alt="Example of Callback Function in JQuery" style="display: block; margin-bottom: 10px; clear: both; max-width: 100%;" decoding="async" loading="lazy" srcset="https://jharaphula.com/wp-content/uploads/2016/05/callback-function-300x198.jpg 300w, https://jharaphula.com/wp-content/uploads/2016/05/callback-function-182x120.jpg 182w, https://jharaphula.com/wp-content/uploads/2016/05/callback-function-106x70.jpg 106w, https://jharaphula.com/wp-content/uploads/2016/05/callback-function.jpg 750w" sizes="auto, (max-width: 300px) 100vw, 300px" /><p>A callback function is a function that is passed to another function as parameter. Callback function is called inside other Function. A callback function is...</p>
<p>The post <a href="https://jharaphula.com/example-of-callback-function-in-jquery/">Example of Callback Function in JQuery</a> appeared first on <a href="https://jharaphula.com">OneStop Shop</a>.</p>
]]></description>
										<content:encoded><![CDATA[<img width="300" height="198" src="https://jharaphula.com/wp-content/uploads/2016/05/callback-function-300x198.jpg" class="webfeedsFeaturedVisual wp-post-image" alt="Example of Callback Function in JQuery" style="display: block; margin-bottom: 10px; clear: both; max-width: 100%;" decoding="async" loading="lazy" srcset="https://jharaphula.com/wp-content/uploads/2016/05/callback-function-300x198.jpg 300w, https://jharaphula.com/wp-content/uploads/2016/05/callback-function-182x120.jpg 182w, https://jharaphula.com/wp-content/uploads/2016/05/callback-function-106x70.jpg 106w, https://jharaphula.com/wp-content/uploads/2016/05/callback-function.jpg 750w" sizes="auto, (max-width: 300px) 100vw, 300px" /><p>A callback function is a function that is passed to another function as parameter. Callback function is called inside other Function. A callback function is essentially a pattern. Use of a callback <a href="https://jharaphula.com/php-string-functions-with-example/" rel="noopener noreferrer" target="_blank">function</a> is also known as a callback pattern.</p>
<p>JavaScript Compiler compiles the code line by line. Let you want to execute some block of code and then only you need to execute another block of code written just after this. For an example in the following code I want to show a alert message after the paragraph get hide. In side jquery document.ready method, here I am using Jquery selector to select the paragraph from my page &amp; using hide method from Jquery I am hiding the paragraph.</p>
<p>About Callback here the hide method accepting 2 parameters. First parameter is for hiding speed &amp; the second parameter is our Callback function. Which contains a simple alert message. This message will call only after the paragraph is hide. This is a simple example.</p>
<h3>Example</h3>
<pre class="brush: xml; title: ; notranslate">&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;&lt;script src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot; language=&quot;javascript&quot;&gt;
$(document).ready(function() {
$(&quot;button&quot;).click(function() {
$(&quot;p&quot;).hide(&quot;slow&quot;, function() {
alert(&quot;The paragraph is hide on page.&quot;);
});
});
});
&lt;/script&gt;&lt;/head&gt;
&lt;body&gt;
&lt;button&gt;Click to hide the Paragraph&lt;/button&gt;
&lt;p&gt;This is the paragraph to Hide.&lt;/p&gt;
&lt;/body&gt;&lt;/html&gt;</pre>
<p>The post <a href="https://jharaphula.com/example-of-callback-function-in-jquery/">Example of Callback Function in JQuery</a> appeared first on <a href="https://jharaphula.com">OneStop Shop</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://jharaphula.com/example-of-callback-function-in-jquery/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			<media:content url="https://jharaphula.com/wp-content/uploads/2016/05/callback-function.jpg" medium="image" />
	</item>
	</channel>
</rss>
