How to disable all links using jQuery

To disable all links using jQuery you cna use the snippet below.

Samples

jQuery Sample

If you have any questions or suggestions feel free to rate this snippet, post a comment or Contact Us via Email.

Related links:

Please rate this snippet

How to select an element with its name attribute in jQuery

To select an element with its name attribute in jQuery you can use the snippet below.

Samples

Javascript Sample

if you remove the div in div[name=”de.Fesslersoft.Testname”] you will get all elements with the specific name.

You can also have a look at this JSFiddle.

If you have any questions or suggestions feel free to rate this snippet, post a comment or Contact Us via Email.

Related links:

Please rate this snippet

Base64 encoder and decoder

We have just released the first tool in our new Tools section. It’s a unicode compatible base64 encoder/decoder, which uses HTML, AngularJs and Bootstrap.

Base64 Encoder/Decoder

If you have any questions or suggestions feel free post a comment or Contact Us via Email.

Top 10 reads of July 2015

These are our Top 10 reads of July 2015.

  • How to match strings using wildcards in C# and VB.NET
  • IsSmallerThan generic extension method for C# and VB.NET
  • How to prevent your IOS app from going into sleeping mode using Objective-C
  • How to convert Color to Hex and Hex to Color using C# and VB.NET
  • How to read a embedded resource to String in C# and VB.NET
  • How to convert a Securestring to String using C# and VB.NET
  • How to change the encoding of a String using C# and VB.NET
  • How to get focusedrow cell value using Devexpress XtraGrid in C# and VB.NET
  • How to get the selected row index in Devexpress Xtragrid Control using C# and VB.NET
  • thanks to all visitors, bookmark us, share us, talk about us, Follow us!, Like us! let’s grow bigger! You can even participate in our Github Projects!

    Please rate this snippet

    How to add or remove a class on hover using jQuery

    To add or remove a class on hover using jQuery you can use the snippet below.

    Adding a Class

    See this JSFiddle for adding a CSS-Class.

    $('#test1').hover(function(){  $(this).addClass('hoverClass');});
    

    Removing a Class

    See this JSFiddle for removing a CSS-Class.

    $('#test1').hover(function(){  $(this).removeClass('hoverClass');});
    

    Please rate this snippet

    How to use the HTML5 datalist tag

    HTML5 Datalist Element

    Description

    HTML5 introduced the new <datalist> tag, which specifies a list of predefined <input> element options. It is used to provide the autocomplete feature on <input> elements. Users will see a drop-down list of pre-defined options as they input data. This element has no other attributes than the global attributes, common to all elements. The id of the datalist element must match with the list attribute of the input box.Keep in mind that Safari doesn’t support datalist yet. If you are using this element with an unsupported (older) browser version, the most browsers will simply ignores the datalist tag and render rest of the webpage. Internet Explorer 9 and below is a little bit special, it will simply print the option values to the page (a possible workaround can be found at http://viralpatel.net/).

    Usage

    Here you can see a Basic example on how to use the datalist tag in HTML5.

    Live Sample

    Keep in mind that this Live-Example only works on supported Browsers.



    JSFiddle’s

    If you have any questions or suggestions feel free to rate this snippet, post a comment or Contact Us via Email.

    Related links:

    Compatibility:
    working Chrome
    working Internet Explorer
    not tested Firefox
    not working Opera
    not working Safari

    Please rate this snippet

    How to check if an array contains a value in Javascript

    To check if an array contains a value in Javascript you can use the snippet below.

    Sample Javascript

    Array.prototype.inArray = function (inputValue) {
    	var counter;
    	for (counter=0; counter < this.length; counter++) {
    		if (this[counter] === inputValue) {
    			return true;
    		}
    	}
    	return false;
    };
    

    Please rate this snippet

    How to disable comments on posts older than date X in WordPress

    To disable comments on posts older than date X in WordPress you can use the snippet below.

    Sample mySQL

    UPDATE wp_posts SET comment_status = 'closed' WHERE post_date < '2013-01-01' AND post_status = 'publish'
    

    Please rate this snippet