I need to run a link is it possible to determine when a link is excuted.

I need to run a link is it possible to determine when a link is excuted.

I need to run a link <link href="jquery.mCustomScrollbar.css" rel="stylesheet" type="text/css" />
is it possible to determine when a link is excuted.

I currently have the link installed in the head like

<head>
.
.
.
.
.
.
<link href="jquery.mCustomScrollbar.css" rel="stylesheet" type="text/css" />
</head>

and it fires my script.

<script>!window.jQuery && document.write(unescape(''))</script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
<script>!window.jQuery.ui && document.write(unescape(''))</script>
    
<!-- mousewheel plugin -->
<script src="jquery.mousewheel.min.js"></script>
<!-- custom scrollbars plugin -->
<script src="jquery.mCustomScrollbar.js"></script>
    
<script>
(function($){
$(window).load(function(){
$("#content_1").mCustomScrollbar({
scrollButtons:{
enable:true
}
});
$("#content_2").mCustomScrollbar({
scrollButtons:{
enable:true
}
});
});
})(jQuery);
</script>

----------------

for the id '#content_1'  and the contents does scroll with a added scroll bar..

but for the id '#content_2' it does not fire unless I nudge the width of the screen.

can I put the link <link href="jquery.mCustomScrollbar.css" rel="stylesheet" type="text/css" /> in a javascript function or in css ??

I forgot to add that the content for the id content_2 is in a collapsable role
<div id="content_2" class="content2" data-role="collapsible">

so the problem is that the scroll bars do not appear when the collapsible shows this content ... not until i resize (nudge) the width of window.