[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x

jQuery

17K

Solutions

5K

Contributors

jQuery (Core) is a cross-browser JavaScript library that provides abstractions for common client-side tasks such as Document Object Model (DOM) traversal, DOM manipulation, event handling, animation and Ajax. jQuery also provides a platform to create plugins that extend jQuery's capabilities beyond those already provided by the library.

Share tech news, updates, or what's on your mind.

Sign up to Post

0
Become a CompTIA Certified Healthcare IT Tech
LVL 12
Become a CompTIA Certified Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

function $(def){
	try{
		if(def.charAt(0) == "#"){
			return document.getElementById(def.replace("#",""))
		}else if(def.charAt(0) == "."){
			return document.getElementsByClassName(def.replace(".",""))
		}else if(def.charAt(0) == "@"){
			return document.getElementsByTagName(def.replace("@",""))
		}else if(def.charAt(0) != "#" && def.charAt(0) != "."){
			console.error("bad define with >>> " + def)
		}
	}catch(err){
		console.error(err)
	}
}
HTMLElement.prototype.text = function(str){
	this.innerHTML = str
}
HTMLElement.prototype.click= function(eve){
	this.addEventListener("click",function(){
		setTimeout(eve,0)
	})
}
function keyevent(key,eve){
	try{
	if(key.charAt(0) == "@"){
		window.addEventListener("keydown",function(){
			if(event.code == key.replace("@","")){
				setTimeout(eve,0)
			}
		})
	}else if(key.charAt(0) == "#"){
		window.addEventListener("keyup",function(){
			if(event.code == key.replace("#","")){
				setTimeout(eve,0)
			}
		})
	}else if(key.charAt(0) == "."){
		window.addEventListener("keypress",function(){
			if(event.code == key.replace(".","")){
				setTimeout(eve,0)
			}
		})
	}
	}catch(err){
		console.error(err)
	}
}

Open in new window

i made something like jquery
the using like almost like jquery
$("") for define the Elements use the dot for classes and # for id and @ for tags
and click method to make click event Ex.. > element.click(function(){//code here})
and text() like jquery edit the innerHTML value
keyevent to do event with press key and upkey and downkey
use the @ for keydown
use the # for keyup
use the . for keypress
and more coming

who can help me to add cool ideas

0
Heyyy good Evening everybody

when i was used adaptiveSlider jquery plugin for no of divisions the only first division run properly remaining divisions images not display so how solve this problem

i have provide following jquery code

$(document).ready(function(){
var i;
 $('.cold li').click(function(){
 i=$(this).index();
 
 if(i==0){
 
 $(".fruit").fadeIn(1000);
 $(".servicesitems").css({'filter': 'blur(5px)'});
 }
 if(i==1){
 //alert("ok"+i);
 $(".fruit_creation").fadeIn(1000);
 $(".servicesitems").css({'filter': 'blur(5px)'});
 }
 
 if(i==2){
 //alert("ok"+i);
 $(".nutty").fadeIn(1000);
 $(".servicesitems").css({'filter': 'blur(5px)'});
 }
 
 if(i==3){
 //alert("ok"+i);
 $(".must_try").fadeIn(1000);
 $(".servicesitems").css({'filter': 'blur(5px)'});
 }
 
 if(i==4){
 $(".kids").fadeIn(1000);
 $(".servicesitems").css({'filter': 'blur(5px)'});
 }
 else{
 }
 });
 
  $('.fruit .fa').click(function(){
 $('.fruit').fadeOut(1000);
 $(".servicesitems").css({'filter': 'blur(0)'});
    });
      
       $('.fruit_creation .fa').click(function(){
 $('.fruit_creation').fadeOut(1000);
 $(".servicesitems").css({'filter': 'blur(0)'});
    });
      
      $('.nutty .fa').click(function(){
 $('.nutty').fadeOut(1000);
 $(".servicesitems").css({'filter': 'blur(0)'});
    });
      
      $('.must_try .fa').click(function(){
 $('.must_try').fadeOut(1000);
 $(".servicesitems").css({'filter': 'blur(0)'});
    });
      $('.kids .fa').click(function(){
 …
0
Used jquery ui sortable function for the first time this week. It was really easy to create a drag and drop list and serializing the order to save in a database was really easy. Not sure why I hadn't tried to use it before.
5

jQuery

17K

Solutions

5K

Contributors

jQuery (Core) is a cross-browser JavaScript library that provides abstractions for common client-side tasks such as Document Object Model (DOM) traversal, DOM manipulation, event handling, animation and Ajax. jQuery also provides a platform to create plugins that extend jQuery's capabilities beyond those already provided by the library.

Related Topics