Attribute Contains Selector [name*=”value”]
Viewed 663 times since Wed, Sep 30, 2020
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>attributeContains demo</title> <script src="https://code.jquery.com/jquery-3.5.0.js"></script> </head> <...
Read More
How to get Response Header location from jQuery Get?
Viewed 553 times since Wed, Sep 30, 2020
for some headers in jQuery Ajax you need to access XMLHttpRequest object var xhr; var _orgAjax = jQuery.ajaxSettings.xhr; jQuery.ajaxSettings.xhr = function () { xhr = _orgAjax(); return xhr; }; $.ajax({ type: "GET", url: 'http:/...
Read More
Hidden image after redirect by check filename
Viewed 441 times since Wed, Sep 30, 2020
$("img.class").load(function() { var noImage = this.src; var xhr; var _orgAjax = jQuery.ajaxSettings.xhr; jQuery.ajaxSettings.xhr = function () { xhr = _orgAjax(); return xhr; }; $.ajax({ type: "GET", url: noImage, success: function(data) { console...
Read More
How to apply style to parent if it has child with CSS?
Viewed 394 times since Thu, Oct 8, 2020
$('ul li:has(ul.child)').addClass('has_child');Ref:https://www.geeksforgeeks.org/how-to-apply-style-to-parent-if-it-has-child-with-css/
Read More
jQuery multiple events to trigger the same function
Viewed 391 times since Mon, Sep 28, 2020
$('#element').on('keyup keypress blur change', function(e) { // e.type is the type of event fired });Reference:https://stackoverflow.com/questions/2534089/jquery-multiple-events-to-trigger-the-same-function
Read More