You need to make sure that jQuery is loaded, so that you can use it.
In functions.php:
function namespace_enqueue_scripts() {
if ( is_page( 'slug-of-new-page-you-are-creating' ) )
wp_enqueue_script('jquery');
}
add_action( 'wp_enqueue_scripts', 'namespace_enqueue_scripts' );
Related Posts:
- Using JavaScript and JQuery in Page
- Adding a Calculator to a WordPress Page
- JQuery Plugins in WordPress
- Javascript will not run properly
- Add infinite scroll to content splitted post
- How to add jQuery script to an individual page?
- Replace Dashes Before Title in Page List
- Prevent WordPress from adding linebreaks to javascript embedded in a page
- What are the options for running custom css and javascript files on a page?
- Backend option to include a javascript file on specific pages?
- Call the content of a page in AJAX in WordPress
- Enqueuing Script in functions.php vs on the page
- WASM page in WordPress website
- Add a predefined page to site
- Can’t get done anything with admin.php response
- loading a javascript on a WP PAGE
- How To Render Shortcode In AJAX Response?
- Showing Different Code on Pages With Different Layouts
- Loading scripts on specific pages using PHP in footer.php
- Stop playing music (rev slider) when user opens new tab
- Press This for Page
- Converting HTML to WordPress theme: integrating pages function and using its text editor, conditional enqueuing
- My AJAX requests take 30 seconds to complete
- static page with buton that opens collect email form
- Admin panel: Javascript not loading properly. Cannot edit pages/posts [closed]
- How do I use (or mimic) document.getElementById() on a page loaded from WordPress database?
- How to deal with net::ERR_SSL_PROTOCOL_ERROR?
- Use images like checkboxes
- JavaScript error (Uncaught SyntaxError: Unexpected end of input)
- Failed to load resource: net::ERR_CONTENT_LENGTH_MISMATCH
- Javascript isnull
- Set value to currency in
- SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
- HTML Entity Decode
- The ‘describe’ keyword in javascript
- jQuery sort elements using data id
- Cannot read property ‘preventDefault’ of undefined in javascript error
- jQuery UI ” $(“#datepicker”).datepicker is not a function”
- What is the difference between $paged and $page?
- Enable Submit Comment Without Page Reload (Using Ajax)?
- multi page password protection
- Move WordPress native javascript to bottom of page?
- How to Add a .js file Only in one specific Page Dynamically to Head
- Change admin startpage to Pages-page?
- How to use WordPress (PHP) functions in AngularJS partials files?
- Trying to get single posts to load on the front page via ajax
- WordPress 4 and wp_editor() Not Showing Visual/Text tabs
- Redirect to a page if ancestors is empty
- Get Order of Meta Box in a Page/Post
- Check to see if page exists problems
- Modify Page Title before output via wp_page_list
- Custom /page/2/ template (different from index.php)
- Enqueuing javascript files
- Front Page not showing on Pages
- Why doesnt ONE of my links in the footer work properly? [closed]
- Create subpage – filter parent pages list
- Use lots of pages, or categories/posts?
- How-to Change Content with location change?
- Ajax Modal Flickers When Opened Multiple Times
- How get get list of pages in ajax search
- How to Move My Page into WordPress dashboard main menu
- List child pages by slug not ID?
- Force page to open in html mode
- Do the permalink settings apply to pages as well as posts?
- List of JS Events for Widgets?
- get_pages() & “child_of”
- Javascript stopped working [closed]
- How to detect if is_404() or is_page() or etc…? [closed]
- “Conflict” with jQuery (or its plugins)?
- url – ajax loaded but no JS
- check first and last child pages wordpress
- How can I get the blog page ID?
- Proper procedure for wp_insert_post?
- Read more on pages WordPress
- Uncaught ReferenceError: jQuery is not defined – although jQuery is loaded [closed]
- Parent page shows no child content
- Use page template for custom $_GET content
- get content from page through AJAX
- Custom page only editable by one user
- Page Title repeating
- Prompting for review / reapproval of page content
- Limit the amount of main pages
- Add the same content to multiple pages
- WordPress Customizer: Check for value of CSS selector and replace it
- Share a folder with files
- Front Page post mirroring revisions to other pages, constantly updating itself
- Microsoft Security Essentials is blocking my WordPress website in IE11
- Adding scripts before plugins scripts
- Author information on all pages
- Add role and edit page capabilities
- Why this plugin is not working?
- Add text to the bottom of particular pages
- WordPress, page 2 shows the same posts as page 1
- pagination does not work with query_posts. Help! [duplicate]
- Subpage Conditional
- I have over 3000 child pages – but I need a different main page
- How to enable automatic search results in WordPress
- How to make a conditional statement that checks if the page is the child of a certain page?
- How react js and other Javascript Technologies works on WordPress plugin?