https://cdn.jsdelivr.net/gh/ragasave/ragasave_js@latest/src/ragasave.min.js
<script src="https://cdn.jsdelivr.net/gh/ragasave/ragasave_js@latest/src/ragasave.min.js"></script>
Ragasave(selector : string)
: To select elements from documents and it returns Ragasave Object
//Exaple:
Ragasave('h1') // Ragasave Object
Or
rc('h1') // Alternative of Ragasave()
callback
Required. Specifies the function to run when the event occurseventKey
Optional parameter to assign key to event for further useuseCapture
Optional. A Boolean value that specifies whether the event should be executed in the capturing or in the bubbling phase.
fire when mouse down and mouse up on element.
Ragasave('.block').active(function(){
console.log('Mouse Down');
}, function(){
console.log('Mouse Up')
});
fire when remove focus from element .
// with callback Parameter
Ragasave('.block').blur(function(){
console.log('focus removed');
});
// with callback and eventEey Parameter
Ragasave('.block').blur(function(){
console.log('focus removed');
},'myEventKey');
// with callback, eventEey and useCapture Parameter
Ragasave('input').blur(function(){
console.log('focus removed');
},'myEventKey', true);
fire when the input value change .
// with callback Parameter
Ragasave('input').change(function(){
console.log('value changed');
});
fire when the click event occurs .
// with callback Parameter
Ragasave('#clickMe').click(function(){
console.log('Clicked');
});
fire when the double click event occurs .
// with callback Parameter
Ragasave('#clickMe').dblClick(function(){
console.log('Double Clicked');
});
...
Ragasave('.foo').add('<div></div>');
Ragasave('.foo').after('<div>div</div>','<div>div2</div>',true);
Ragasave(".bar").attr('name');// get value of name attribute
// set value of name attribute
Ragasave(".bar").attr('name','last_name');
Ragasave(".bar").animate({
top : 10
},2000);
Ragasave('.foo').before('<div>div</div>','<div>div2</div>',true);
Ragasave('.foo').clone(true);
Ragasave('.foo').css({
color : 'red',
width : 100
});
Ragasave('.foo').delAttr('name');
Alternative method
removeAttr(attr)
Ragasave('.foo').delClass('test1');
Alternative method
removeClass(class)
// Itrate Each Element With .foo class
Ragasave('.foo').each(function(elem, index){
// Code Here
});
exClass
replaces the class1
to class2
.
Ragasave('.foo').exClass('test1', 'test');
find
search the given selector into child elements.
Ragasave('.foo').find('#test1');
Ragasave(".bar").first();
Alternative method
firstChild([depth] [,callback])
Ragasave(".bar").last();
Alternative method
lastChild([depth] [,callback])
Ragasave(".bar").height(); // Get height of element
Ragasave(".bar").height(10); // Set height of .bar to 10
// Multliplying the current height of element by 10
Ragasave(".bar").height(function(height,elem){
return height * 10;
});
Ragasave(".bar").hide(); // hide all element with class .bar
Ragasave(".bar").hide(true); // hide first element
Ragasave(".bar").show(); // show all element with class .bar
Ragasave(".bar").show(true); // show first element
// Get height including padding
Ragasave(".bar").innerHeight();
// Get height including padding and border
Ragasave(".bar").innerHeight(true);
// Get width including padding
Ragasave(".bar").innerWidth();
// Get width including padding and border
Ragasave(".bar").innerWidth(true);
// Get width including padding
Ragasave(".bar").innerWidth();
// Get width including padding and border
Ragasave(".bar").innerWidth(true);
Ragasave('head').loadScript({
type : "text/javascript",
lang : "javascript",
path : ['main.js']
});
Ragasave('head').loadScript({
type : "text/css",
rel : "stylesheet",
path : 'main.css'
});
Ragasave(".bar").next();
Alternative method
nextSibling:([nth] [,callback])
return next element or previous element as existence.
Ragasave('.foo').nextOrPrev();
Ragasave('head').loadScript({
type : "text/css",
rel : "stylesheet",
path : 'main.css'
});
on
binds event to selected elements.
Ragasave('.clickable').on('click',function(){
// Code Here
});
on
unbinds event to selected elements by using eventKey
or event handler function
.
function func(){
// Code Here
}
// bind event
Ragasave('.clickable').on('click',func,'myfunction');
// remove event by handler
Ragasave('.clickable').off('click',func);
// or by eventKey
// remove event by handler
Ragasave('.clickable').off('click','myfunction');
Ragasave(".bar").prev();
Alternative method
prevSibling:([nth] [,callback])
return previous element or next element as existence.
Ragasave('.foo').prevOrNext();
Ragasave(".bar").remove();
Ragasave(".bar").show();
Ragasave(".bar").unwrap('.parent');
val
to set or get the value
of input fields.
Ragasave("input").val('test');//set value of input
Ragasave("input").val();//get value of input
Ragasave(".bar").width(); // Get width of element
Ragasave(".bar").width(10); // Set width of .bar to 10
// Multliplying the current width of element by 10
Ragasave(".bar").width(function(width,elem){
return width * 10;
});
Ragasave(".bar").wrap('<div></div>');
-
Ajax : ƒ
App : {}
TextEditor : {}
View : Class View
ViewData : Class ViewData
ViewList : Class ViewList
Event : {}
add : ƒ
getStack : ƒ
- `push : ƒ``
remove: ƒ
removeStack : ƒ
UI : {}
Containera : {}
Column : ƒ
Popup : ƒ
Tab : ƒ
Controls : {}
Button : ƒ
CheckBox : ƒ
Radio : ƒ
SelectBox : ƒ
TextField : ƒ
init : ƒ
submit : ƒ
throwError : ƒ
validate : ƒ
Layout : {}
Center : ƒ
Middle : ƒ
Ragasave.ajaxBefore : ƒ
Ragasave.ajaxEnd : ƒ
Ragasave.ajaxError : ƒ
Ragasave.ajaxJson : ƒ
Ragasave.ajaxProcess : ƒ
Ragasave.ajaxProgress : ƒ
Ragasave.ajaxStart : ƒ
Ragasave.ajaxSuccess : ƒ
Ragasave.camelToDash : ƒ
Ragasave.createNode : ƒ
Ragasave.extend : ƒ
Ragasave.form : ƒ
Ragasave.getMouseDirX : ƒ
Ragasave.get: ƒ
Ragasave.getMouseDirY : ƒ
Ragasave.getMouseDirection : ƒ
Ragasave.onInput : {}
validation : ƒ
Ragasave.post : ƒ
Ragasave.unit : ƒ
Ragasave.style : ƒ