The Form $F() function
the $F() function will returns the value of form element.
$F("form_element_id")
Does it need a description anymore??
the $F() function will returns the value of form element.
$F("form_element_id")
Does it need a description anymore??
The dollar function is one of the Prototype Utility Function. $() is the most frequently used prototype’s function. basically it was used to refer an element in the HTML page. The function is quickly shorthand for getElementById.
The usual function identifying an element is:
document.getElementById("element_id")
The $() function reduces the code to:
$("element_id")
For example, you can set the CSS text color with this code:
$("element_id").style.color = "#ffffff";
Or, the “Prototype way”:
$("id_of_element").setStyle({color: '#ffffff'});
jQuery main function is the ‘$(document).ready() function’. Although it’s many way to start jQuery, Always use this function to start using jQuery is good. example:
$(document).ready(function() {
$('.header-company').addClass('highlight');
});
This will add class named ‘highlight’ to element that have ‘header-company’ class. This is used generally for changing / adding class for CSS. So, when the document was loaded, the jQuery command will add the CSS Style.