Question on where to place script - works at bottom, does not work at the top.
I have 2 jsfiddles that have the same code, just one places the script at the top of the html and one places the same script at the bottom of the html. http://jsfiddle.net/k1Lxabh1/ <--- script at top, does not work. http://jsfiddle.net/kzm4kasb/ <--- script at bottom, works. So my question is why? I think this has something to do with the onLoad vs onDomready, but I'm not sure. Note if I take the <script> out of the html and place it in the javaScript section of jsfiddle it works--- as long as
Replicating hover for tabbing through navigation
Hey guys, I am working on a new navigation system for a website. The navigation is an unordered list with hidden divs, hovering over the <li> element expands the hidden div and shows the menu. I want the website to be accessible and as such would really love the div to be shown when someone tabs onto the hyperlinks inside the <li> on the main menu. Here is the code which I use to show the hidden div when someone hovers: $('#health_nav_option' ).hover(function() { $('div.dropdown', this).toggle();});
simple button or link
Hi i have very limited knowledge on json, js but im ok with php and html. I have small page where on the index page i want to create a small js or js type link/button. when it is clicked it will execute the php code in a php file which is in the same folder as the index file but without redirecting to another page. ive been searching google for days now and i am no better than when i started you have no idea how much i would appreciate some help with this, i just do not know where to start. thanks
Jquery to Mysql db help
<script type="text/javascript">var x=5;//saati atıyoruz
var yaz="";//en son yazılması için bir değişken tanmlıyoruz
var fark=0;//dakika farkı için bir fark değişkeni tanılıyoruz
var dakika;//dakikayı tanımlıyoruz
var count=0;
var username = "Jeremy";
var lvl = 1;
function say()//fonksiyonu tanımladık
{
var dakika=0;//ilk dakikayı 0 tanımladık
x--;//x den 1 eksiltiyoruz
if(x<10){//x 10dan küçük ise başına 0 kouyoruz 01 tarzında görülsün
yaz="0:0"+x
How to do remember choice image.
Hello, I have this for a script to change the images in the background. $(document).ready(function(){ $('#menu').click(function(){ $('#thumb').slideToggle('slow'); }); $('li img').click(function(){ var imgbg = $(this).attr('dir'); $('body').css({backgroundImage: "url("+imgbg+")"}); }); $('#bgimage').click(function(){ $('#thumb').hide(); }); }); It's just that after the change and refresh the page returns to its original state. Let us take to the selected image wyśiwietlał all the time (ie. selection
How jquery is different from javascript?
Hello everyone, I am a new learning user to jQuery. But i am often confused between jQuery and javascript. Can you please tell me the difference between two. Regards Genevive Ocansey
Unable to get Jquery doing calculations without having to physically change value in field
Hello, I have a few fields, when the quantity is changed, the total is calculated but there is a problem, if I load the page prepopulated from mysql and change the price value without touching the quantity, the total do not change. Please see the attached picture to understand the problem better. Imagine that I load this form with pre populated data(update page), if I change dropdownlist 1 and 2, without physically changing the quantity, then the input field 3(total) will not change. Any idea why
translator
hi i want to add google Tanslator with flags n html website what will be its code?
Drag & Drop Problem...
Hi everyone! I am a jQuery newbie, and looking for a little help. I am making a drag & drop application. But I have run into a few problems which bring up a few questions. First of all, I have a box inside of a box. The main box is called .bullpen, the boxes inside the bullpen are . . . bpstore under there, I have created 6 smaller boxes that are called driverbox. The problem I have encountered is I cannot get all the bpSTORE's to be draggable.I can get one of them to be draggable. But not all of
Help on datepicker (with textbox) installation for complete beginner
Hi, I am competly new to JQuery. I came across looking for a datepicker widget and I seem to have found it in JQuery UI. I have just spent over a day to get the datepicker widget to work on my webpage, in vain. I find it all confusing and apart from the download button that do download, the code from the website (with a textbox linked to the datepicker) doesn't seem to work when copy/pasted to my webpage. Can someone please enlight me? A step-by-step beginners guide perhaps? Much appreciated. Vincent
Why jQuery change my headers height ?
Hello I'm using this website structure : http://tympanus.net/Freebies/Cardio/ I use PHP to validate the contact form. When this contact form is OK, the contact form disappear but the headers height change about 70000px. Firefox says https://code.jquery.com/jquery-1.11.1.js line 4305 and 5211 change the header properties. Do you know why? Just tell me what isn't clear for you. Antoine
difference get and post ?
<html> <head> <title>Orders</title> <style type="text/css"> ul li .edit{ display: none; } ul li.edit .edit{ display: initial; } ul li.edit .noedit{ display: none; } </style> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script> <script> $(document).ready(function(){ $.ajax({ type: 'GET', url: 'http://-get.php', dataType: 'json', success: function(data){ $.each(data, function(key, value){ var html = '<li>'+
The rules work and the messages don't work
Hello, I have a problem with the validation messages in jQuery. I have a dynamic form, I put rules (rules) for field 'tel_m' and it works well for all the fields (dynamic). Now I would write 'messages', the problem is that the validation does not work very well: it is enough for me to write a single field correctly (not vacuum telling figures) and the form is submitted WITHOUT than other fields are valid. Where is the mistake? EDIT: $ ('input.comment'). each (function () { $ (this)
errors thrown in Brackets
Hi There, Super noob here. I am trying to run jQuery JavaScript Library v1.11.3 in Brackets on OS X. When I open the file in Brackets to sight the code there is a litany of errors thrown. eg: 'module' was used before defined Combine this with the previous statement Expected 'jQuery' at column 9, not column 5 There are more than 50 errors. Brackets stops looking after 50. I must be doing something very wrong here??? screen grab available here: http://www.leapfrog.net.au/client/lincoln/Screen%20Shot%202015-08-17%20at%202.39.21%20am.png
Code help
Hello, i have this piece of code <script src="//code.jquery.com/jquery-1.11.3.min.js"></script> <script> $(document).ready(function(){ $(".text1").click(function(){ $(".text1nezobrazeny").toggle("slow"); }); }); </script> <p class="text1">click for show</p> <p class="text1nezobrazeny" style="display: none;">show</p> Best thing will be when u look at my web site http://heliocare.neomed.cz/doporuceni/ As you can see. When u click on 1 link, all links show up. Is it possible make 1 click 1 link show
How can i use jquery validation with safari
i try to use jquery validation with safari but i can't some people told me that it not support to safari that is right ??
How to populate second dropdown list based on the first one
Hello, I am having a real problem..... I have 2 dropdown list that are dynamically populated via php, I am struggling populating the second dropdown list based on the first dropdownlist choice. Here is my code: <select name="<?php echo "action".++$action_id; ?>" class="form-control products" id="<?php echo "products".++$products_id; ?>"> <?php $query_field3 = "SELECT * FROM products ORDER BY name desc";
Need Help display data in inGrid
Hi every one, Can you help me how to make a php script to retrieve data from database using jQuery inGrid or send me a link please. http://reconstrukt.com/ingrid/#overview
How can I disable JQM css on one of the pages?
So I have a few HTML pages. and in th index I load the css from JQM and al the JQ and JQM. How can I not load, let's say the JQM css in one of the pages? I want it to be applied to the index and some others, but not to a specific one. What's the best way to do it? I'm only asking because Im using http://photoswipe.com/ on one page, and the CSS from JQM makes it look really bad, How can I "disable" it for just this page.
installes jquery in joomla voor graphbars but isn.t working
I installes the jquery plugin (eorisis JQuery) in Joomla and made an article for testing a bargraph but the page is blank {source} <?php arrayOfData = new Array( [10.3,'Jan','#f3f3f3'], [15.2,'Feb','#f4f4f4'], ); $('#divForGraph').jqBarGraph({ data: arrayOfData }); ?> {/source}
Search and hide divs
Hello, how can i hide and filter all FAQs, that not contain the search term "Auto". I want to hide both the panel-heading and the panel-body and tried so far: $('.panel-body:not(:contains(' + s + '))').parents("div.panel-heading").hide(); $('.panel-body:not(:contains(' + s + '))').hide(); $('.panel-body:contains(' + s + ')').show(); <!-- FAQ1 --> <div class="panel panel-default panel-faq"> <div class="panel-heading">
javascript design patterns
Hi, someone recently asked me about design patterns in Javascript. I said that it seems that many of the design patterns implemented in C# could be implemented in Javascript as well. Is this a true statement? Are there any design patterns in C# that cannot be implemented in Javascript? Are there any particular design patterns that are specific to Javascript? Are there any design pattern implementations in Javascript with noteworthy differences to their C# counterparts?
Conflict with two jquery's codes
Hi, I have 2 codes of jquery : 1- The first creates forms 2- The second should do a control for the field "tel" which is : required + digits The problem is that these two codes does not work together. I tried the function : jQuery . noConflict (); But nothing changed How to do ? Here is my code : https://jsfiddle.net/mp00z0L0/1/ Thank you
Toggling between showing all images and showing only a certain class
Hey guys, I'm very new at jQuery and am probably asking a very simple question, but I can't for the life of me figure this one out. I've probably looking for the wrong thing entirely or using the wrong keywords.. Anyway, here's the idea. I have a list of a number of images which I want to show in its entirety at first. For example say some of these images are red, some are grey and some are blue. Then I want the user to be able to show only the red or only the grey or only the blue, by choosing in
New to Jquery.
Hi All, My name is Tamil. I have moved from System Admin side to Development side. I have been asked to get familiarized in jQuery and jQuery UI. I don’t know from where I need to start. Can anyone guide me from where I need to start learning and I want to know is there any prerequisite for learning jQuery. Thanks, T
Multiple instances of Jquery tabs conflicting?
Hello, I am a sharepoint admin trying to create a landing page for my staff and I want to use jquery tabs. I am very new to this stuff, and am trying my best. Here is the situation. 1. I am using Sharepoint 2010 2. I am using Easytabs for main navigation 3. In each CEWP I would to place jquery tabs for various content (probably 4 instances) 4. The first instance works fine, everything after that has been a problem. 5. Biggest problem is that my other instances the other tabs do not work and all the
Trouble with .children() not finding newly prepended <li>
I'm totally new to jQuery/JS and am just trying to work on some basic skills I recently learned by creating a basic To Do list in which: User inputs text into a textarea. Prepend that text as a new <li> to a list (ul .to-do) using .prependTo() Once the new <li> is added, the user should be able to click it to change the class to "complete" Everything works except the last step. addClass() does not work when the new <li> is added by the user. When I open up the inspector, I see that there is no event
Jquery Ajax Call on page load and on click event
Can anyone please share how can i call a jquery ajax function with default parameter on page load and then same function with different parameter on mouse click event.
Breaking item out of expandable list based on search query
Hello, I'm working on an expandable list list that breaks out certain items if they meet the search query. By break out, I mean they get listed below the bar of the collapsed list. Like this. +Click for full application list Known use: -Test item 2 +Click for full application list (expanded example) -Test item 1 -Test item 2 -Test item 3 Known use: -Test item 2 I hope that explains that well enough. When I mean break out, the whole UL for that search result
Need menu to dropdown using keyboard
First let me say, I'm new to jQuery and its been a while since I've done anything with Javascript. Second, this isn't my code, I came into the project a couple of months ago and trying to figure out what goes with what. What do I need to do so that when someone tabs into the menu it will drop down just like it does when you mouseover it? Is this even possible? if(ie === "1") { if($(window).width() > 949) { $.fn.pause = function (a) { $(this).stop().animate({ dummy: 1 }, a); return this }; function
How to get the default currency and percentage symbol using globalize 1.0
How to get the default currency and percentage symbol of particular culture using Globalize 1.0 file and how to change the symbol dynamically. Please help me to find the solution... Thanks
Why my code jquery doesn't work ?
Hello, I have a simple form, I want to do this control in my field "phone" : required + digits. Code : http://codeshare.io/fGxgD My control doesn't work, where is the error ? I try Firebug but it doesn't detect errors.
Send sort to an e-mail
Hello, how can a sort like this can be sent to mail? i've been doing an example, good for the drag n drop sorting, but cannot have this order sent to mail. here's what iv'e had so far: http://juremosserfelices.com/drag/ Please letme know where to look for it if this is not the right place.
Opinion Poll : fill up div with color as per percentage of Yes and No Count
Dear Sir In a opinion poll module I am using a php program to derive new count (this program is called by jquery) I am getting correct counts from php (opinion polll Yes and No count) my final query function is var opyn= $('#opinionpollfilldiv').text().split('~'); // i am getting value from php program when a person clicks yes or no //Value a I get is 88~5 means 88 Yes count and 5 is No count // alert(opyn[0]+' '+opyn[1]); // i split them and getting correct values $('#countyes').val(opyn[0]);
Remove background color and show picture instead
Good afternoon, I have this code in index: <div id="Menu"> ... command images... <div/> and then other line: <div id="1" style="position: absolute; width: 29px; height: 29px; top: 30px; left: 30px; background-color: rgb(0, 0, 0);"></div> so the idea is that when you click on a command image the change of several divs with specific IDs occur. I am trying something like: $("#1").removeAttr('bacground-color'); $( "#1" ).attr( "bg-image", $src ); ... in other way I am trying to see just a picture instead
How to avoid this toggle() behavior?
Hey fellas, I'm just a jquery newbie, I just notice that when you toggle() (hide/unhide) a div, there is a weird diagonal movement, I would like to get this div scrolling up or down only, and not in a horizontal way, is this possible with this or another jquery function? Thanks in advance!
Ajax Accordion and draggable/droppable
Hi all, I am fairly new to JQuery and work with ASP/Ajax and Javascript most of my time. I do like the way that JQuery is so succint and compact and I am beginning to use it more and more. I have a site that is based upon a treevew but want to be able to show more information to the user so have an Ajax Accordion. I want to be able to drag and drop data from one pane in one accordian and drop to the other. after 2 days trying to get _something_ working I am getting close but I really don't think
swipe php page
I have a mobile website that extracts data from a mysql database. There are categories which contain photographs. Basically the photographs are numbered. As a last page I have a page where one photograph is displayed full width. I have a session variable in this page holding the array of photographs so the number of the next and previous photo is known. IIf there had to be a button to go to the php file with the next photo I would call the page again with a request variable holding the next number.
Want to understand a particular form of jquery syntax - Newbie Dumb question.
(function(global, factory) { 'use strict'; if (typeof define === 'function' && define.amd) { define(['jquery'], function($) { return factory($, global, global.document, global.Math); }); } else if (typeof exports !== 'undefined') { module.exports = factory(require('jquery'), global, global.document, global.Math); } else { factory(jQuery, global, global.document, global.Math); } })(typeof window !== 'undefined' ? window : this, function($,
Issue with tab links inside tabs
Hi all, I am very new to jquery and it is the first time posting on here. I have an issue with links that are within one tab not opening the other tabs when they are clicked, the href changes but the content does not open. I have tried reloading the page and replacing the href but to no avail and I have tried to write code that makes the relevant li class="active" to make the content show using parent(), closest() but I dont have the know how to get it right. Example html below: <div class="fusion-one-full
Next Page