All jQuery Tips

Export table data to Excel using jQuery

You must have exported table data to excel using server side language like ASP.NET, PHP, JSP etc. But how about exporting HTML table data to Excel using jQuery. To export the table, use window.open() method to open Excel application and pass the table's content. window.open(MIMEtype,replace); MIMEtype: Optional. The type of document you are writing to. […]
Read the rest of this entry »

jQuery code to hide

tag with specific text

Suppose your webpage has many <p> (Paragraph) tags/elements, and you want to hide those paragraph elements which have specific text or word. For example, hide all p tag element which have "jquery" word in it. This can be done easily using jQuery. jQuery has ":contains" selector which can be used to select p tags with […]
Read the rest of this entry »

tag with specific text

Convert Text to Links using jQuery

Yesterday for one of my requirement, I needed to convert bold text of the a div element to hyperlink using jQuery. To do this, jQuery provides wrap() method which is used to wrap HTML element around each of the matched elements. Below jQuery code, uses jQuery wrap() method to wrap the bold text to hyperlink. […]
Read the rest of this entry »

How to remove/delete selected item from a dropdown using jQuery

In this post, find jQuery code to remove or delete selected item from a dropdown list using jQuery. $(document).ready(function() { $('#btnDelete').click(function() { $('#ddlList option:selected').remove(); }); });? See result below See Complete Code Feel free to contact me for any help related to jQuery, I will gladly help you.
Read the rest of this entry »

How to get previous page URL using jQuery

jQuery code to get the previous page URL. The referrer property returns the URL of the document that loaded the current document. $(document).ready(function() { var referrer = document.referrer; }); The referrer property is supported in all major browsers. But there is a problem here. It is quite possible that Page URL is shared through social […]
Read the rest of this entry »

Expand textbox on focus using jQuery

Here is jQuery code to expand the textbox onfocus using jQuery. Below code animate and expand the width of a TextBox when it receives focus. $(document).ready(function() { $('#txtSearch').width(150); $('#txtSearch').focus(function() { $(this).animate({ width: 250 }) }); $('#txtSearch').blur(function() { $(this).animate({ width: 150 }) }); });? See result below. See Complete Code Feel free to contact me for […]
Read the rest of this entry »

Responsive Menu
Add more content here...