DEV Community

Discussion on: From jQuery to JavaScript – How to make the move 🌠

Collapse
 
silvervision profile image
Silver vision

Yes this is possible to convert jquery to javascript but its very difficult to manage everything in javascript.I also try a lot to convert it at the end i found one online tool that convert jquery to javascript easily.The tool is workversatile.com
workversatile.com/jquery-to-javasc...

Collapse
 
webdeasy profile image
webdeasy.de

I tried two codes snippets, but it doesn't seem to work....
If that really works, it would be insane!

Collapse
 
silvervision profile image
Silver vision

Can you please give me your snppets?

Thread Thread
 
webdeasy profile image
webdeasy.de

I tried this:

$('p').click(function() {
alert('test');
});
Enter fullscreen mode Exit fullscreen mode

It gives me the same output.. :c

Thread Thread
 
silvervision profile image
Silver vision

What is p?
Id or class so please # or . Before p and try.

Thread Thread
 
webdeasy profile image
webdeasy.de

That's working, great!
But p oder h2 or something like that should work. This selects all p (or h2) on the page

Thread Thread
 
silvervision profile image
Silver vision

Yes its correct i will contact owner of this tool and reply here.

Thread Thread
 
webdeasy profile image
webdeasy.de

I will test it more, but it already looks good