I want to know that when we have a function with parameters that
works like a VB procedures
When and how can I use this function ?
How can we call this ?
<script type="text/javascript">
function place(div, image_x, image_y )
{
$("#"+div).css("position", "absolute") ;
$("#"+div).css("left",image_x+"px");
$("#"+div).css("top",image_y+"px");
}
When and how can I use this function ?
I tried to use this in several ways , but It seems that JQuery didn’t activate .
some of my efforts to call this : (maybe funny)
(function($) {
// $(document).ready( function(){
$.fn.Place = function place(div, image_x, image_y) {
}) (jQuery)
jQuery(function($) {
place("pnlLinx", 700 , 500 ) ;
});
or simply :
place("pnlLinx", 700 , 85 ) ;
with no effect
thanks in advance
This should be a simple question for people knew the structure of JQuery
I’m not totally familiar with the structure of JQuery but I used it different ways
in my codes .
this example is just for learning one part of this structure ,
that I had problem .
See this http://www.jsfiddle.net/ , that might help you in understand where to put that code.
Also Code in Javascript section of jsfiddle link needs to wrapped in
<script>tagComplete Code