Download the PHP package laravel-creative/jquery-actions without Composer
On this page you can find all versions of the php package laravel-creative/jquery-actions. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download laravel-creative/jquery-actions
More information about laravel-creative/jquery-actions
Files in laravel-creative/jquery-actions
Package jquery-actions
Short Description Turn jQuery into magic with php
License MIT
Homepage https://github.com/mustafakhaleddev/jquery-actions
Informations about the package jquery-actions
Turn jQuery into magic with php
Tired of jquery ajax ? and laravel blades , now all of those things has been turned into magic , with this creative package you can do all ajax stuff without writing any javascript code. also if you want to write fast laravel function without routes or controllers you can do it , i told u its magic :)
Installation
You can install the package via composer:
jQuery Actions
- onClick()
- on()
- static()
- jqueryForm()
- $options array
JqueryHelpers
- append()
- remove()
- hide()
- show()
- html()
- console()
- alerts()
requires
This package requires jquery and jquery-confirm
you can install by cdn
Usage
jQuery Actions
Jquery actions is static class with facades
you can use it on laravel blades
to do the magic.
all functions are based on jquery ajax and secured hashed urls , of course you can use your own routes
onClick()
when you use this function in blades like this and don`t forget to add @jqueryScripts
blade directive in the end of your file after jquery scripts.
when the user click the Say Hello
button , an ajax request will go to secured hashed url and the response will be Hello
-
Ok Great , but i want to run the function from controller ?
Then you have to mention the controller and the actions like this. - that`s awesome, but i want to use custom url
then you can use $options
array to make the magic.
so for custom urls your code would be like this
- all methods work the same way as function and options
on()
in javascript you can use $('#id').on('onmouseenter',function(e){})
to run a method when mouse enter div with id #id
you can use the same with this package.
with all onClick()
magic too. you can use all html attributes on the first parameter
static()
You can make your own static javascript function without inline tag method,
in javascript you can use $('#id').on('hover',function(e){})
to run a method when mouse hover a div with id #id
you can use the same with this method. its ajax too.
jqueryForm()
you can do the magic with forms too.
start your form tag
then add your fields and close the form
JqueryHelpers
You saw those keys in $options
array above
how can you use them.
1- you can use pure javascript or jquery functions as text
instead of null
to control the ajax response.
2-or you can use our jqueryHelper
functions.
append($selector, $openTag, $msg, $closedTag)
uses jquery append
function
you can use {data}
to access javascript data object {data.msg}
remove($selector)
uses jquery remove
method to remove element
hide($selector)
show($selector)
html($selector,$msg)
change element html
console($msg)
write to the console
static function function($selector, $function, $msg)
this would print $('$selector').$function('$msg');";
for example i want to change html of div when success.
so the result would be
jqueryAlert($title, $msg)
we uses jquery confirm
alerts to display alerts messages.
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
- Mustafa Khaled
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of jquery-actions with dependencies
illuminate/support Version 5.1.* || 5.2.* || 5.3.* || 5.4.* || 5.5.*|| 5.6.* || 5.7.* || 6.* || 7.*
jeremeamia/superclosure Version ^2.0