I am new to jquery and haven’t spend much time with JavaScript either. What I am trying to achieve is to create a function that open a colorbox based on the inparameter. So basically you call the function and the colorbox opens.
function openWindow(textstring) {
$(textstring).colorbox({inline:true, width:"50%"});
};
function openWindow(textstring) {
$.colorbox({html:textstring});
};
works, I saw it on their official page. Had looked at the same page yesterday but probably didn’t saw it because of my limited jquery syntax knowledge. Wasn’t meant to answer my own question.