Click here to Skip to main content
15,867,488 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
hi guys how can i transfer my java script code into jquery code cananyone help me out?

What I have tried:

this is my js

var el_up = document.getElementById("moi");
var el_down = document.getElementById("jeu");
var str = "Kies man of vrouw";

el_up.innerHTML = str;

function changeColor(color) {
    document.body.style.background = color;
}
  
function tjeu() {
    changeColor('green');
    el_down.innerHTML = "U bent een man";
}     

function vbucks() {
    changeColor('purple');
    el_down.innerHTML = "U bent een vrouw";
}     
Posted
Updated 12-Jun-22 6:24am
Comments
Richard Deeming 13-Jun-22 4:12am    
Why? Most people are trying to go the other way - convert jQuery code into plain Javascript.

Most modern browsers support enough standard Javascript these days that jQuery is unnecessary. Adding an extra 30Kb overhead to every page load for a library that you don't actually need is pointless.

You Might Not Need jQuery[^]
Member 15670930 13-Jun-22 4:24am    
I need it jquery trust me its for someting that has to be in jquery.
Richard Deeming 13-Jun-22 4:26am    
So a homework assignment then?

Nothing else needs to be in jQuery.

If you want someone to help you, you're going to need to update your question to show what you have tried and explain where you are stuck.
Member 15670930 13-Jun-22 4:29am    
yep,

i tried for the el_down.innerHTML $("").html("text here") but didnt work for me the other things i have no idea to transfer it to jquery.
Richard Deeming 13-Jun-22 4:30am    

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900