I want to write simple javascript, something for collecting visitor info and the script needs JQuery to run.
Then I want to provide that script, so other websites can include/load it from me externaly, using script src="my_web/my_javascript.js"...
My dilemma is how to handle JQuery part, how to include JQuery, I don't know wheather the site that will include it has JQuery loaded or not, and if I force loading JQuery I don't want to cause conflicts or any problems on the site that uses my script.
$('#someId').html('<div></div'>'), you translate it todocument.getElementById('someId').innerHTML = '<div></div'>'. This was a simple example. For more complex ones check jquery source and put the source directly into your code. But this solution is only good if you use a small subset of jquery.