How to find, which one is calling my function?
<p>I have a function, that is called by interval function, as well on click on a link, my link will clear the interval, and call the same function again.</p>

<p>calling this types will do the different work, but i don't know how to find, whether my interval function is calling my function or onclick function calling my function..</p>

<p>How can i find the caller of my function?</p>

<p>This is my function </p>

<pre><code>function slideshow (){
    $('#slide_viewer ul').css({marginLeft : -(slideWidth * currentSlide)+'px'});
    if(currentSlide == (totalSlides-1)){
        currentSlide = 0;
    }else{
        currentSlide++;
    }

}
var myInterval = setInterval(slideshow,3000);

$('a.control').click(function(){
    currentSlide = ($(this).attr('id') == "prev") ? (currentSlide = currentSlide-1) : (currentSlide = currentSlide+1);
    slideshow ();
})
</code></pre>
