$self has little to do with $, which is an alias for jQuery in this case. Some people prefer to put a dollar sign together with the variable to make a distinction between regular vars and jQuery objects.
example:
var self = 'some string'; var $self = 'another string';
These are declared as two different variables. It’s like putting underscore before private variables.
A somewhat popular pattern is:
var foo = 'some string'; var $foo = $('.foo');
That way, you know $foo is a cached jQuery object later on in the code.
Related Posts:
- What is the := operator?
- What does “:=” mean in Pseudocode? [closed]
- syntax error: unexpected token <
- syntaxerror: “unexpected character after line continuation character in python” math
- JavaScript error (Uncaught SyntaxError: Unexpected end of input)
- JavaScript error (Uncaught SyntaxError: Unexpected end of input)
- Nested JSON objects – do I have to use arrays for everything?
- JavaScript error (Uncaught SyntaxError: Unexpected end of input)
- jQuery preventDefault() not triggered
- jQuery onclick not firing on dynamically inserted HTML elements?
- slideToggle JQuery right to left
- How to send a PUT/DELETE request in jQuery?
- if-not condition fails (jQuery)
- How do I select text nodes with jQuery?
- Using prevNext Modx Addon
- TypeError: only integer scalar arrays can be converted to a scalar index with 1D numpy indices array
- How to prevent the “Confirm Form Resubmission” dialog?
- Substring in excel
- Difference between associative entity and associative relationship attribute?
- max value of integer
- How to install apoc for neo4j?
- Is there a way to get Bing’s photo of the day?
- How do you copy and paste into Git Bash
- How can I refresh a page with jQuery?
- What does “?” mean in Java?
- Python: SyntaxError: keyword can’t be an expression
- git pull on a different branch
- Are multi-line strings allowed in JSON?
- What does “-ne” mean in bash?
- What does on() in JavaScript do?
- How to convert .crt cetificate file to .pfx
- wait() or sleep() function in jquery?
- How to convert selected HTML to Json?
- Has the nativescript sidekick discontinue?
- jQuery if checkbox is checked
- Jquery .on(‘scroll’) not firing the event while scrolling
- How can I get a web site’s favicon?
- Why does the number of rows change during AIC in R? How to ensure that this doesn’t happen?
- How to use the command update-alternatives –config java
- How to Scroll Down – JQuery
- What is the difference between a heuristic and an algorithm?
- Can we use & in url?
- Highlight a word with jQuery
- Form Submit jQuery does not work
- jQuery multiple events to trigger the same function
- Fastest way to extract frames using ffmpeg?
- what is the difference between bisizeimage , bisize and bfsize?
- How do I remove a box-shadow effect from an element when another element is hovered?
- jQuery delay not working
- How to save the state of a drag and drop jQuery UI Sortables front end layout editor?
- How can I fetch loop of post titles via AJAX?
- AJAX Implementation
- Refine/Filter WP_Query Posts with jQuery or Ajax
- Googles jQuery: Are There Avantages to Using It?
- Toggle Sidebar Display
- Create URL with parameter for JQuery toggle status
- Stop theme’s jQuery function from running
- hover image appears below placeholder instead of overlayed
- How to reference a function from a class in a different file which is also namespaced?
- Simple JS function Not Working
- WordPress Ajax problem with undefined url
- Use Media Uploader on Multiple Images on same page
- How can I fire a jQuery event once getBlocks() actually returns the post’s blocks instead of null?
- Change upload folder for a CPT
- Can’t get done anything with admin.php response
- delete post meta by AJAX
- Pull GetOption() variable into jQuery dynamically created html
- merge wp rest api query to get posts per category does not work
- making a plugin that moves other plugins wp_head actions to wp_footer
- how to json_encode(); the Loop content so that the encoded array is [“0”:content, “1”:content]
- Load more posts in the same category – Ajax + Timber
- Ajax search shows all results when user empties input?
- Why i can’t get custom fields value or post ID via Ajax?
- How to call custom jQuery plugins into the customizer controls
- Change zurb foundation top bar style on.scroll in wordpress theme using jquery and css
- datepicker value in mysql
- WP_ENQUEUE not working with Foundation 5
- Unexpected token ILLEGAL, even on clean install – jquery-issue?
- Problem adding MP3 attachments to a jPlayer playlist
- Weird issue where form field loses focus to previous form field even with JS disabled
- Hide Slider on Post Type Page
- sliding/fading header plugin or approach suggestion
- Trigger jQuery to add events after AJAX-loading table in admin plugin
- Putting custom html/js page into Elementor as it’s own block
- Redirect after scrolling the page
- Menu item that hides when you click the previous submenu
- wp_ajax_ 400 Bad Request
- Scroll to ID broken in main menu
- jquery Autocomplete
- How to call a function from functions.php with ajax?
- Execute jQuery with custom event listener after successfully add an item to the cart
- how to avoid reloading/refresh the page when displaying the post of wp_list_categories
- Follow author on muti-user WordPress site
- Adding unique marketing messages between certain products whilst using isotope/Infinite Scroll
- Trying to fix multiple category drop down
- jQuery to Create Button to Show/Hide WordPress Comments and to Hide Comments by Default
- My .js file is getting a 404
- how to display post in jquery slider and carousel
- Carousel Hover Image
- Can’t seem to check off a category checkbox with jquery?