[英]obscure jquery syntax in supersized slider
I was going through the supersized.3.2.5.js file of the full screen image slider - supersized . 我正在浏览全屏图像滑块的supersized.3.2.5.js文件( 超大) 。
I can't understand the syntax of the following lines. 我不明白以下几行的语法。 Though I am not pasting the complete code here yet i think that is not any prob for the syntax explanation.
尽管我没有在此处粘贴完整的代码,但我认为这对语法解释没有任何帮助。
/* Variables
----------------------------*/
var el = '#supersized',
base = this;
// Access to jQuery and DOM versions of element
base.$el = $(el);
base.el = el;
I need the explanation of the last 2 lines ... 我需要最后两行的解释...
They just save the jQuery object and the id string in different variables 他们只是将jQuery对象和id字符串保存在不同的变量中
The jQuery one gets prefixed with $ jQuery一个以$开头
base.$el = jQuery Object version of el (#supersized) base。$ el = el的jQuery对象版本(#supersized)
base.el == just the id (the string) base.el ==仅是id(字符串)
倒数第二行存储的是jQuery对象,其中包含ID为“ supersized”的DOM元素,而最后一行仅存储选择器字符串“ #supersized”。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.