First of all I am new to javascript so this question might be stupid.
I have a requirement where i would provide a js script to other websites to include in their webpages.
Now my question is should I use jquery or plain javascript.Will/Can jquery effect the rest of the functionality of the site.
Plus what is the benefit I will get using jquery over plain javascript.
My requirement is to get all images of the website and do some processing on the images on these websites.
Thanks in Advance.
I would say, if the processing does not involve jQuery then do not use it.
You need to deal with the following issues if you include it
All issues have workarounds/solutions but you have to implement each an everyone of those.
If you just need to find all images in page, then you can use the
.getElementsByTagName()methodand just do the processing on that..
You might need of-course to attach your code at the
loadevent to be sure that whatever your code does, the DOM is ready to accept it..for modern browsers that would be
.addEventListener(), while for IE it would be.attchEvent()your script could be something like this
demo: http://jsfiddle.net/gaby/nXPzk/