Q: how to call global function in jquery i have make two global function now i want to call them in my HTML page. i have make separate file for global function and calling them it into our HTML page but it seems that something wrong with my code
<script type="text/javascript">
(function ($) {
    jQuery.functionOne = function () {
        var text = "i am first"
    };
    jQuery.functionTwo = function (param) {
        var text = "i am second"
    };
})(jQuery);
$('.first').text().functionOne();
$('.second').text().functionTwo();
</script>


<body>
    <div class="first"></div>
    <div class="second"></div>
</body>


A: Try this please: If you are calling these functions within text function then try like the code below: Demo http://jsfiddle.net/SMLTP/ or http://jsfiddle.net/SMLTP/1/
Update demo according to your updated code: http://jsfiddle.net/SMLTP/8/
If you keen: http://api.jquery.com/text/ 
Hope this helps or please lemme know if I missed anything! :)
$('.first').text(function(){
    return functionOne();
});

$('.second').text(function(){
      return   functionTwo();
});

sample function =>
 $('.first').text(function(){
         return functionOne();
    });


function functionOne(){
    return "HULK is awesome";
}
​

Update 
functionOne = function() {
    var text = "i am first"
    return text;
};

functionTwo = function() {
    var text = "i am second"
    return text
};

$('.first').text(function() {
    return functionOne();
});

$('.second').text(function() {
    return functionTwo();
});

