What is difference in JavaScript and jquery? [duplicate] - javascript

This question already has answers here:
What is the difference between JavaScript and jQuery? [closed]
(6 answers)
Closed 7 years ago.
I have 1 year of experience in ui devoloper and i have to sweech my compony,
SO when i attened 1st interview the interviewer ask me one question i.e.
In your application you use javascript or Jquery or both,so i am not give him a proper answer so please anyone give me the answer for this question.

Pure javascript also known as vanilla js (like a joke). And pure js works faster than frameworks based on js.
There is a compartment of frameworks and pure js http://vanilla-js.com/. But using frameworks is easier than pure js.

Related

How to make vanilla JS version of jquery CSS function? [duplicate]

This question already has answers here:
How to change CSS property using JavaScript
(7 answers)
Closed last year.
i am trying to get rid of jQuery in my projects but i ran into an issue: editing CSS styles with vanilla js. in jQuery there is a function$("#anything").css("color", "red");. What is the equivalent of this function in vanilla JavaScript?
document.getElementById('anything').style.color = 'red';
See MDN.

Textarea html tag with support `css` code [duplicate]

This question already has answers here:
Textarea that can do syntax highlighting on the fly?
(11 answers)
Closed 2 years ago.
I'm looking for textarea so I can write css code inside it. And have a good graphic appearance for displaying css code
As in the picture below:
There can be really one of two ways to do that: either you will implement it yourself OR use ready made libraries. Solutions like that exist in great variety and it could save you a lot of time to use one of following or find a similar one:
Edit Area
highlight.js
CodeMirror

What would be the pure JavaScript alternative to this jQuery selector? [duplicate]

This question already has answers here:
Lightweight alternative to jQuery for class / id selecting
(6 answers)
Closed 8 years ago.
I have this jQuery selector:
$('#stuffElements').find('[data-markerlayer="layer1"]');
I have a ton of selectors similar to this one, and I want to optimize my script as much as possible, as rewriting most selectors requires only minimal effort on my part.
Disregarding the discussion whether this is useful, is it possible to write the above selector out in pure JavaScript?
document.querySelectorAll('#stuffElements [data-markerlayer="layer1"]')
or to make it more efficient:
var holder = document.getElementById('#stuffElements'); // cache parent node
holder.querySelectorAll('[data-markerlayer="layer1"]'); // finds inside it
querySelectorAll doesn't work in IE7 if that bothers you.

Auto complete tag like Stack Overflow [duplicate]

This question already has answers here:
jQuery autocomplete tagging plug-in like StackOverflow's input tags? [closed]
(6 answers)
Closed 9 years ago.
What is the idea behind implementing a tagging system like Stack Overflow? This is a question for the front-end implementation of it. What are some libraries that are available out there that will allow me to create a front-end tagging system with auto-complete and tag separator like the one Stack Overflow/pivotal tracker uses?
jQuery UI autocomplete is a good start. Here is the documentation on using multiple values with it. I've used this plugin in several projects for a variety of purposes, including a tagging UI.
Of course, you need a handler to receive the selected values, but that's pretty trivial with AJAX. Your question was about front-end implementation, so I assume you have your back-end data structures covered.
https://github.com/aehlke/tag-it
seems like a good start, it allows autocomplete by using hardcoded or ajax options(various other cool options too), not to mention almost all the front-end nice stuff

What is the difference between JavaScript and jQuery [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
Possible Duplicate:
What is the difference between jQuery and JavaScript?
Would please tell me the difference between Javascript and Jquery? I know about PHP and MySQL. Now,I want to learn JavaScript.
jQuery was written using JavaScript, and is a library to be used by JavaScript. You cannot learn jQuery without learning JavaScript.
Likely, you'll want to learn and use both of them.
JQuery is built on top of JavaScript.
JavaScript is pretty powerful, but can be difficult to program. jQuery is sort of a wrapper around JavaScript that makes it easier to program.
For example, instead of JavaScript's
document.getElementById('myDiv').style.backgroundColor="#FFF"
in jQuery you simply do
$('#myDiv').css('background-color','#FFF');
jQuery also simplifies stuff like XMLHttpRequests and such like. jQuery allows one to focus on the problem and not worry about what goes on in the underlying JavaScript too much.
That's my half-arsed attempt at explaining things. I'm sure someone can do better!
Jquery is Javascript's function. It's framework (library), which helps you (from Jquery's moto:) "Write less, do more"
the difference is javascript is a language and jquery is a library created by using javascript...
here is an excellent SO link with learning javascript resources https://stackoverflow.com/questions/11246/best-resources-to-learn-javascript
jQuery is a javascript framework that extends a lot of the basic functionality of javascript (better DOM traversal, animation stuff, cross-browser compatibility, etc).
The Wikipedia page gives a good explanation.

Categories