The problem was the positioning of code, the javascript should be placed inside the DIV tag rather than above it. This makes the thing work.
Related Posts:
- JavaScript Loading Screen while page loads
- Getting click on item to open closest relevant element (popup) with jQuery
- Site images are fixed in front of my site content [closed]
- How do I link a JavaScript file to a HTML file?
- How can I scroll to an element using jQuery?
- Bootstrap Dropdown menu is not working
- Change Background color (css property) using Jquery
- JavaScript runtime error: ‘$’ is undefined
- Set timeout for ajax (jQuery)
- Use images like checkboxes
- Bootstrap Dropdown menu is not working
- Bootstrap Dropdown menu is not working
- Click button copy to clipboard
- How to make html table vertically scrollable
- Uncaught TypeError: Cannot read property ‘top’ of undefined
- Why is the jquery script not working?
- How to make a simple image upload using Javascript/HTML
- How to make Bootstrap carousel slider use mobile left/right swipe
- bootstrap 3 navbar collapse button not working
- Play/pause HTML 5 video using JQuery
- Refresh/reload the content in Div using jquery/ajax
- How to get height of div in px dimension
- jQueryUI dialog width
- How to display raw JSON data on a HTML page
- How to call a webservice method from an html page [javascript] with out refresh the page
- Javascript – ERR_CONTENT_LENGTH_MISMATCH
- Random background images CSS3
- Why is jquery show() not working in example
- jQuery scrollTop() method not working
- Fully responsive HTML5 video
- How do I remove a box-shadow effect from an element when another element is hovered?
- Slide right to left?
- How to use aria-expanded=”true” to change a css property
- How to set “style=display:none;” using jQuery’s attr method?
- jQuery UI Datepicker not working
- Automatically decrease font size for long words
- Show post in slider
- Accordion scrolls page too low after clicking on the title [closed]
- Adding a Calculator to a WordPress Page
- How to keep HTML form field that is conditional hidden with javasript hidden after page reload?
- Is it OK combined wp-include js, jquery, css? [closed]
- Replacing WordPress Icons (menu,icons32, etc)?
- Add other class content with reference class value
- Overriding inline !important CSS with Javscript code snippet with media query
- Unable to use Datepicker in a table when inserting a row
- jQuery function not working in WordPress but works in jsfiddle
- WP Media Uploader modal conflicts with Bootstrap modal
- Possible jquery / library conflict in plugin usage
- change the icon of a custom post type in WordPress to use twitter boostrap
- Element works, but not on wordpress site [duplicate]
- can’t make jQuery work (change image on time interval) [closed]
- start.js:45TypeError: Not enough arguments on Safari [closed]
- WooCommerce Ajax Cart Update Stopped Working
- Rhyzz Repeatable-fields javascript in php and wordpress
- How to Dynamically Load Content Into Body of Bootstrap Modal Window?
- I want to import my Json file into a custom made display-modal. How do i link my Json file?
- Help with a jQuery Carousel
- Using bootstrap-slider and bootstrap-switch in wordpress admin panel
- WordPress Comments – Rich Text
- WordPress Multiple Navigation bars
- show/hide div with simple jQuery script [closed]
- Searching multiple tags and adding jQuery dependant script onto page template?
- TinyMCE 4 remove/add attributes for all images
- Trouble with WordPress Ajax Login System – 302
- Limit filetype and wp media
- videopress videos are not displayed when loading the content with ajax in a lightbox
- How does WordPress handle HTML Tables interaction with jQuery
- Javascript stopped working [closed]
- Call a javascript function from another file
- Fall Back Google CDN in JavaScript
- window.onload wont execute in wordpress
- How to return multiple arguments from AJAX callback function
- Why load JS through the CMS framework? [duplicate]
- JS news ticker is not working on home page but working on other pages. How to solve this?
- Problem passing id-specific objects to javascript via wp_localize_script
- url – ajax loaded but no JS
- How can I get the search form to be selected automatically?
- Google yolo one tab signup plugin avilable in wordpress? [closed]
- Add Codepen animation as Preloader to WordPress
- What is the propre way to include jQuery UI Datepicker’s CSS in plugin?
- Cannot set property ‘className’ of null at setThemeFromCookie
- WP Customizer compare and set a value via javascript
- Callback After WordPress Customizer Complete Loading
- “JQMIGRATE: Migrate is Installed” How do I find the problem code? [duplicate]
- Referrer URL with jQuery or Javascript – Cache & Referrer URL Issue
- Why doesn’t jQuery use $, and how can I get it do so (GLOBALLY)?
- Theming Using Bootstrap Glyphicons and WordPress Dashicons
- Adding a slide toggle on WordPress
- Create special WordPress slideshow with “jquery.cycle.all.js”
- Using Foundation 5 in WordPress Administration Area
- I have an old version of jQuery showing up. How do I figure out where it is coming from?
- Plugin Scripts no loading on options page
- Close Fancybox, sumbit form data and redirect
- How do I include javascript/jquery image resizing with wordpress?
- Ajax Validation for reCaptcha
- Superfish Menu Not Loading
- How to enque js script in footer that are not in .js file?
- Loading scripts on a single page plants the script in the footer
- Getting a ‘slide down’ js panel implemented within WP
- Properly embed javascript into WP (using function.php) – doesn’t work?