I have the following function which works very well within a $(document).ready(function(){
$('.threadWrapper > .littleme').click(function() {
$(this).next().toggle();
$(this).toggle();
$('.littleme').not(this).next().hide();
$('.littleme').not(this).show();
// re-run masonry
$('#mainContent').masonry();
return false;
}).next().hide();
What I want to be able to do is call this from inline javascript Each div element that contains the threadWrapper class also has its own id. What I want to do is to be able to trigger this function using inline javascript calls and sending an id as a parameter. For example:
$(function(id){
$('#id > .littleme').next().toggle();
$('#id > .littleme').toggle();
etc. etc.
});