I am considering modifying the jQuery plugin to meet the additional requirements that I need.
Sorry, this is not a programming issue, but can you pass the array from javascript to the jQuery plugin that will support all its information or will I lose the contents of the array between javascript and the jQuery plugin?
Thanks. TT.
jQuery is written entirely in javascript. The jQuery extensions (and indeed jQuery) are just normal functions. This is nothing special and no different, so to answer your question, yes, you can pass arrays.
, .
// plugin definition $.fn.myPlugin = function(arrArg) { // the plugin implementation code goes here // do something with arrArg, which is an array };
:
$('.class').myPlugin([1, 2, 3]);
Your array should contain all the same data as during the transfer. jQuery is written in javascript and is just the foundation to make your life easier.
Source: https://habr.com/ru/post/1708979/More articles:How to sort a list by property of objects in a collection? - javaStatic member and inheritance - c ++Huffman Compression Algorithm - algorithmNeed a high efficient algorithm to check if a string contains English speech - algorithmThe difference between '#', '%' and '$' - jstlArrange labels for objects in 2D space without overlapping - layoutbatch file that asks for username / password + registration - loginКак получилось название Cocoa Framework? - cocoaHow can I reliably free memory by removing UIImageViews from the screen? - memory-managementWhat is the default setting that makes Vim really slow on a Mac screen? - vimAll Articles