Q:

How to call a JavaScript function with parameter in jQuery?

This is a simple example to call a JS function when a button is clicked. In this code I used the onclick method, but I want to learn how to call the same method using jQuery instead.
<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script> 
$(document).ready(function(){
    $("#but").click(
        doubleSize($("#inpt").val()); // **maybe not correct here**
    );
});
function doubleSize(x)
{
    //some code make a number double size
}
</script>
</head>

<body>

<input id="inpt" type="text">
<button id="but" type="button" onclick="doubleSize(document.getElementById('inpt').value)" >click me !!</button>
<div><span id="result"></span>
</div>
</body>
</html>

A:

Replace 
    $("#but").click(
      doubleSize($("#inpt").val()); // **maybe not correct here**
    );

with 
    $("#but").click(function() {
      doubleSize($("#inpt").val());
    });

Now it should work. The trick is that .click function has callback function which controlls doings after click, and you now learned to use it.
Check my fiddle.
Find more on api.jquery.com/click.

