Skip to content

Instantly share code, notes, and snippets.

@mickle00
Last active January 4, 2016 01:19
Show Gist options
  • Save mickle00/8547441 to your computer and use it in GitHub Desktop.
Save mickle00/8547441 to your computer and use it in GitHub Desktop.
var jq = document.createElement('script');
jq.src = "//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js";
document.getElementsByTagName('head')[0].appendChild(jq);
var outputString = '';
function getCategory(){
categories = document.getElementById('00NC0000004yBn3').options;
j$(categories).each(function(){
if (j$(this).val() !== ''){
outputString += '\n\t' + j$(this).val();
}
});
}
function main(){
j$ = jQuery.noConflict();
types = document.getElementById('cas5').options;
j$(types).each(function(){
myType = j$(this).val()
outputString += '\n' + myType;
j$('#cas5').val(myType);
j$(types).trigger('change');
getCategory();
});
console.log(outputString);
}
setTimeout(main, 3000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment