Uncaught TypeError: $(...). x is not a function
I am making my first foray into jQuery and I can't seem to solve the 'X is not a function' error. From what I've read online, -for most people the problems seems to be from not declaring jQuery first in the HTML document, but I definitely have it (CDN version and local fallback) before including any other JS files. -for others it was happening because jQuery was not getting loaded for some other reason (but for me it's definitely getting loaded, I tested for it before the line of code that causes
how coordinates in dropdown
Hello, I have a dropdown and i want there coordinates if value. I saw on the internet that it is possible with jquery. see : https://jsfiddle.net/TroyAlford/ZZEk8/ for example coordinates: north: x 89 and y 14. my question is: how can I get coordinates in the dropdown? thanks in advance <select name="value"> <option value="NW">North-West</option> <option value="N">North</option> <option value="South">South</option> </select>
detach() vs remove()
Can somebody say what is the difference? #box { background-color: green; } var tt = $("#box").detach(); $(tt).appendTo("body"); // or var tt = $("#box").remove(); $(tt).appendTo("body"); In both situations - it will do the same. Cut and paste. So, what's the difference?
Anchors and subpages # and /#
Hello everyone, hope you are all doing fine. I am having an issue with a fullpage BootStrap design I'm using. It also has subpages, so I had to replace the anchors like #services with /#services (a dash in front) so the link also works on subpages. However, when on the main page now, in the navbar (bootstrap), the 'active' section doesn't lit up anymore due to the '/' before the anchor. I'm new to jQuery but I was hoping that jQuery could come to the rescue...
On click slidetoggle h4 but hide other ul close first
Hello, I have two lists. Now if you open one list the other doesn't close. How can I make: if you click on one h4 the other list close. How can I make this? thanks in advance the code is: <!DOCTYPE HTML> <html lang="en"> <head> <meta charset="utf-8"> <title></title> <style>ul{display: none;}</style> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script> <script> $(document).ready(function(){ $(".flip").click(function(){
Is generated html dependent on the browser used ?
Hi, Sorry for my question but i completly new with jquery. The question is on the title. Thanks, Tackent.
if(children(first, second).val() == "")
$("form#zzz input[type='button']").on("click", function(){ $(this).parent().submit(); }); $("form#test").on("submit", function(){ if($(this).children("textarea, input[type='text']").val() == "") alert("You need to feel up all fields.") else alert("OK"); }); <div id="comment"> <h2>Some comment</h2> <form id="test" onsubmit="return false"> Name: <br/> <input type="text"/> <br/> Comment: <br/> <textarea rows="5"
Div Expand and Collapse
Hi all, Problem is when I click on link addClass and removeClass working fine but all div's with class "box-panel" slideDown and slideUp at a time and that should not happen. One div should be show or hide instead of all I hope you got my point Script jQuery(document).ready(function () {
var topBoxA = jQuery('.box-top > a');
jQuery('.icon').addClass('iconplus');
jQuery(topBoxA).click(function () {
debugger;
if (jQuery(this).hasClass('iconplus')) {
jQuery(this).removeClass('iconplus');
add pages views to indivisual blog posts
I want to add pages views to my blog , so do i just add the same google analytics code to each page ? Do i need a backend for this at all ? if anybody has done this before can somebody guide me . Thank you. Gautam.
canvas smoke effect .. just like in this site.
I wanted to create a smoke effect just like this one HERE. so i checked the dev tools and there is this element below: <canvas id="glRenderer" width="1366" height="591" style="width: 1366px; height: 591px; transform: scale(1); transform-origin: left top 0px;"></canvas> But when i do ctrl+u and check the source and all the corresponding JS files , i see no id with the following name: glRenderer or even canvas , so how is this effect being created ?? I would really appreciate if somebody could point
Full screen widget
Hello! Sorry for my english but I learn it very long time ago:) I found some widget for website which is: <div class="panel-heading">Burze</div> <div class="panel-body" style="min-height: 280px;"> <iframe height='280px' width='310px' sandbox='allow-same-origin allow-scripts' src='http://pl.blitzortung.org/live_dynamic_maps.php' frameborder="0" scrolling="no"></iframe> </div> when i go for my website i see pictures like this and i have to click "tryb pełnoekranowy" to see map with full size like
Two Slider side by side center of the page
Hello, could someone eventually help me on this? I try to have two slider side by side on the center of the page. (the best is that i could choose the space between them) Maybe there's already a post on this but can't find it. Thank you very much!
Losing ListView formatting when HTML is passed to a <div>
Hello: I am still learning js and jQuery. I ran across this issue I'm hoping someone can point me in the right direction. I have a function in my js file that takes some data and dynamically combines it with HTML and passed to a div in my HTML doc so it can be displayed. Here is that function: function fnShowClassesTable(data) { var str = "<ul data-role='listview' data-inset='true'>";*/ str += "<ul data-role='listview' data-inset='true'>"; // Build a string of HTML; using a <table> str += "<li data-role='list-divider'
Why JQuery Mobile doest work with latest version of JQuery ?
I´m trying to learn JQMobile and I know JQMobile needs JQuery, so I went to the JQuery site and got the lastest version, but it not work! I spent a lot of time to figure it out ! Then after hours I discovered (myself) that it works with JQuery 1.11.1..... You guys should put this in the docs ! Or if it is on the docs, where is it ?
How have some logic inside the jquery Grid for showing buttons
I have a Grid in jquery, I need to have some logic in buttons that are inside the jqery cells taht I am not sure how write the if/statement inside that. This is where bind the grid: function bindUser(result) { var deleteButtonHandler = function (arg) { var recordToDelete = ajaxresult[$(this).val()]; deleteRecord = recordToDelete; $("#deleteUser").html(recordToDelete.FullName); $(".modal-delete").show(); return; } var editButtonHandler = function (arg) { if(search === true) { bindEdit(searchResult[$(this).val()]);
Beginner Problem How do I connect to php file
I have type many Jquery examples non give me a return from the php file. Do I need to reset permissions? The most basic example is: HTML file: <!- // https://www.youtube.com/watch?v=8wUu7pWBygY --> <html> <head> <script src="http://immenselyamazingmarketing.com/HTMLforTesting/jquery-3.1.1.js"></script> <script type="text/javascript"> $(document).ready(function() { $('feedback').load(check.php).show(); }); </script> </head> <body> <form name="form"> Username: <input type="text" id="username_input"
browsers, audio and setTimeout: differences?
Hello all, I have a function which loads a song, and, after a setTimeout, shows the title of the song and a link for new song. The function is attached to a link which displays as "#1"; the link for new song displays as "#2". The setTimeout was determined by playing the song through the browser locally, and synchronising it to a certain phrase--34 seconds from the start of the song. Online testing (OSX 10.11, clearing and disabling caches, private browsing) shows the effort to be precise is not
How can you insert a variable into a string with php function
i have varibale: var content = 222222; var = content; content = '<p>'+ content +'</p>'; it work but when i want use php code inside var content = 222222; var = content; content = '<p><?php anyfuntion('+ content+') ; ?></p>'; it not work what wrong wtih it ? thank for help My code can rune php script, dont mind about it, i just consider why my content variable not work inside ( )
toggle() without setting display to none?
Ok so I have only been playing around for jquery for a couple of days (dear god, its amazing, why am I just now doing this?) Basically I have a div box that I want to change sized when clicked. When the page loads its 150x150 and when clicked it animates to 500x500. I want it to return to 150x150 when clicked again, therefore I am using the toggle function. The first click resizes the div perfectly, but disappears. (the display property is set to none) I'm assuming this has to do with the toggle()
Convert Javascript to Jquery
Hi, i have to convert this javascript to jquery for wordpress. How do it? LoginCard : function(){ var This = this; var o = $("#AreaRiservataForm"); var data = o.serialize(); console.log(data); //alert(data) $.ajax({ type: 'post', url: This.sp, data: data, success: function(data){ console.log(data); //alert(data) data = JSON.parse(data); if(data.status>0){ o.find("input[name='codeLogin']").val( data.codeLogin ); o.attr("action","/card/");//E' Importante che l'ultimo Slash (/) sia presente altrimenti
moving a pix in an other div
Hi, I would like to know how I can do this : I have a pix in a div (div id="01") and I would like to make it disappear (my pix) to make it re-appear in an other div (div id="02") ? Thank for your help.
Get the most upvoted question for the day on stackoverflow.
Hey guys i want to build a simple app in which i pull up the questions for stackoverflow and save the question link in my database. So basically say i would like to pull the most upvoted question for say "gulp" in the past 24 hours on SO. How would i go about doing this ?? I was checking out the javascript SDK. is that all i will need ?? Thank you. Gautam.
Shall I use the :radio selector
In the learning center, Because :radio is a jQuery extension and not part of the CSS specification, queries using :radio cannot take advantage of the performance boost provided by the native DOM querySelectorAll() method. For better performance in modern browsers, use [type="radio"] instead. I am new to jQuery and I wonder why the :radio selector is created in jQuery. Shall I use it?
Cannot get SlickNav to work on current site
I have read a few other posts here who've had this issue, but i didn't find the answer and was hoping someone could assist me. I have been using SlickNav on all of the websites i've created over the past 2 years, however I am having an issue with the current one. This is also the first WordPress theme i have used and I am attempting to replace the themes head with my own and add SlickNav to it. Visually the header is working fine, and the nav disappears correctly, but SlickNav doesn't appear. I'm
Very Slow Loading Tables in WooCommerce
http://cdncoin.wpengine.com/product-category/gold/ Greetings... I am using the following php function on my site to pull in Volume Pricing Discounts on my WooCommerce Shop Pages... The issue that I am having is that these volume discount tables are taking a very long time to load. I am not sure if there is a memory leak issue. If someone could take a quick look and provide advice as to how I can make this load faster this would be really great! Regards Rob //Add Volume Discounts on Shop Pages function
How can I get parts of these strings?
Hi How can I get the playlist id: <iframe src="https://embed.spotify.com/?uri=spotify%3Auser%3A1232159430%3Aplaylist%3A5MmcyYIFKUtPdBleY3WRF5" width="300" height="380" frameborder="0" allowtransparency="true"></iframe> How can I get the track id: <iframe src="https://embed.spotify.com/?uri=spotify%3Atrack%3A1GRU2S5QP5IlK5EyXAkJCB" width="300" height="380" frameborder="0" allowtransparency="true"></iframe> How can I get the Playlist id: <iframe src="//playlists.applemusic.com/embed/pl.4705ab1ed97c4f4bb54f48940faf5623?country=us&app=music"
How to convert a reminder app in JS to PHP/mysqli
I wanted to make a basic prototype reminder app and so i first built it in javascript , so i plain JS i am just basically accepting time from the user and then some Math calculation to return the difference in seconds and then i use a setTimeout like so: setTimeout(function(){ // Remind the user of a task. }, /* difference in secounds from current time to what the user has entered */) The above is basically a oversimplified version of my JS application , but now suppose i have to write the same
new to js and jquery question about moveable/sortable objects
Hi, I am new to jquery and need some help / pointing in the right direction: I have a list, that is generated via php and mysql now I want the objects in the list to be moveable so I can rearrange the order of the list - so far so good, found a script that allows me to do that, but I want the elements to be counted according to the new arrangement so when I return the info into the database the new order is saved- how can I do that? Also the single items in that list have an information on duration
I don't understand why jQuery 2 and 3 won't work, both giving "Uncaught ReferenceError: $ is not defined"
Hello I'm getting pretty confused about the 3 different jQuery branches, so I'm using both chrome and firefox (up-to-date) but I'm getting "Uncaught ReferenceError: $ is not defined" when using the newest 3.1.1 jQuery or 2.2.4... However when I use 1.12.4 everything works, which is strange to me. I'm loading jQuery google CDN as first thing in my pug file: script(src'https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js') and I'm getting an error: jquery.min.js:4 Uncaught TypeError: a.indexOf
I wanto to make a website as...
I want to make a web like these: - 48hourslogo.com - http://www.designhill.com - https://www.logobids.com I have seen that they are made in jquery. I am new and I am learning, I would like to have plugins or programming, to start programming, I do not know much, I would like someone to give me some directions or way to see where to go. Thank you.
Making a slotmachine.
Hello everyone!, So im pretty new to jQuery, but have been reading alot about it, I got a complicated project running, which I'd like to explain. Im trying to make a slot machine from GIF animations, I animated 5 different GIF-animations(the slots) which each has a different outcome, im trying to make it so when I click either to image or lets say a button its start playing GIF(1) till the end, when I then press the button again it starts playing GIF(2) and so on, is something like this possible?
need array element at first
hi all array=["starFilter","taFilter","dealsFilter","hoursFilter",.......,"showFewFilter"] if (array.length>0 && array.indexOf("showFewFilter")>0){ //this time i wanto show my array["showFewFilter"] in first place } i tried like this if(arr.length>0 && arr.indexOf("showFewFilter")>0){ var first =arr[0] var index=arr.indexOf("showFewFilter") arr[0]=arr[index] arr[index]=first } is there any other way
domcontentLoaded
hi all in network i saw Domcontentloaded and load,finsh in network (in console) it consists of time i need what is that time.
Add row with PHP function not working
Dear All <table width="100%" border="0" cellspacing="0" cellpadding="0" id='producttable'> <thead> <tr> <th width="38%">Product Name</th> <th width="18%">Qty</th> <th width="15%">Rate</th> <th width="24%">Value</th> <th width="5%"><label for="rowid"></label> <input name="rowid" type="text" id="rowid" value="1" size="5"></th> </tr> </thead> <tbody> <tr id=<?php echo $rowsid;?>> <td> <?php echo fillDropDown("product","name","id",$_POST['id']," 1 ","productid[]",
how to make a login button with jquery ?
i have a simple index.php file which has a form with a button. When the user clicks the button , jquery script login.js runs and alert the user. for some reason when i click the button nothing happens. from https://www.youtube.com/watch?v=1Z2sQrLfNa0 index.php: <!DOCTYPE html> <html> <head> <title> Log in </title> <script src = "jquery-3.1.1.js"></script> <script src = "login.js"></script> <body> <div style="width:200px;margin:auto;"> <h1> Log in Example </h1> <p> Please log in to you
Popup Generated Not Responding
Hello all, I am new to jquery. I am trying to bring a popup dynamically which contains an MCQ type question. The problem is when the game is being paused in the background along with it the popup is also paused and the selection of the options cannot be made, only the submit and continue button in the popup are working. please help!! index.html <div id="popup" class="modal-box"> <header> <!-- a href="#" class="js-modal-close close">×</a --> <h2>Which of
Slider "slide" event not triggering, but "stop" event does
I am new to jQuery and Javascript and I am trying to dynamically add some sliders which all should trigger the "slide" event. Parts of it are working: when i click the button, I get 5 sliders on my page. But I have the following problems: - I get "NaN" as a tooltip when i hover over the slider. - The slide event is not triggered, but the stop event is. Funny thing is if I insert a slider directly into HTML (not dynamically), it works (it successfully calls a function that is not included in the
How to use jquery in nested collections?
Hi, I am developing a web based application in ASP.Net MVC using Entity Framework following the example cited at http://www.itorian.com/2013/04/nested-collection-models-in-mvc-to-add.html. In the application, I have a one-to-many relationship between Employee and it's wife, daughter, and son. So to enable the user to add multiple wives, daughters or sons, views for Wife, Daughter, and son are created under an EditorTemplates folder. Then, as and when required these views are loaded using @Html.EditorFor(x
How do I make a Sum button with ajax
I have watched the video a couple times. For some reason, I just cannot figure out how to make a sum button that adds 1+2 when the user clicks on the hyper link "sum". https://www.youtube.com/watch?v=7faB8kV43eg Here is my view for /Home/Index: @{ Layout = null; } <!-- --> <!DOCTYPE html> <html> <head> <script src="~/Scripts/jquery-1.10.2.js"></script> <script src="~/Scripts/jquery.unobtrusive-ajax.min.js"></script> <script> $(document).ready(function () { $("button").click(function
how to post a formdata object into ajax post call ?
i have a formdata object how do i post it using ajax post ? I tried it this way: but when i run it in the browser , it will just start an infinite loop, not sure why var formData = { name: "ravi", age: "31" }; //Array $.ajax({ url: "./Index ", type: "POST", data: formData, success: function (data, textStatus, jqXHR) { $("#div3").html(data); //data - response from server
Next Page