Submitting a form that is inside a div without closing the div
Hi, I will start by saying that i am very new to jquery and need that little bit extra help please I have a link that pops up a div and fades out the background. Inside that div i have 3 options, Request a callback make an enquiry close You can see a test version here ( Click Here ) then click Learn More in the top left corner... My question is how can i get my form to submit or validate within the div and without closing the pop up? If you click request callback you will see my form. I really
Variables from the anonymous function
Hi, I hope somebody can help me: I have been banging my head for a couple fo hours now! :) I am using .getJSON() to obtain some data from my server in the following way: $.getJSON ("/jquery.php", {event: "demo"}, function(data) { ... }); Is it possible, and if so how, to make "data" a global variable? In other words, what do I need to do in order to use what the server returns (ie "data") outside of the anonymous function? Thanks, Adrien
.animate with a += variable value?
Good day! I'm getting my teeth into jQuery and I'm trying to add a variable Number to an objects position, at the moment I can only add a Number or use an = variable value. This is my working code: var xMove = 200; var speed = 2000; $("#clickhere").click(function() { $("#animate1").animate({ left: xMove }, speed); }); }); But I want something that works like this: var xMove = 200; var speed = 2000; $("#clickhere").click(function() { $("#animate1").animate({ left:
deBugging...
This function worked fine in a test page, but it's dead in a new local page: Firefox is throwing "(jQuery) not defined' in: (function($){ $.fn.visibility = function(status) { this.css('visibility',status); return this; } })(jQuery) $(document).ready(function(){ $('.hex').hover(function(){ $(this).find('.hN').visibility('visible'); }); $('.hex2').hover(function(){ $(this).find('.hN').visibility('visible'); }); $('.hex').click(function() { $(this).animate({color:"#777"},
Page only works if I include jQuery.js twice.
I know this is not supposed to be that way, but somehow that's the only way it works for me. First I include <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="fadeslideshow.js"></script> where fadeslideshow.js is jQuery-based http://www.dynamicdrive.com/dynamicindex14/fadeinslideshow.htm But I also want to use jQueryUI, so I have to include it: <script type="text/javascript" src="jquery-ui.js"></script> <script> $(document).ready(function() { $("#slidewrapper").draggable();
Multiple (Realtime) Countdown Timers
Hi all, I have been looking all over the internet to find a solution and I cant seem to find one, I hope you can help... I am going to be doing a simple page where I can add (for example) an item what will be visible for 60 Minutes and then dissapear, then simply I will ammend the content and put it on for a further 60 Minutes. There will be a few Instances of this on one page and I am very new to jQuery but I am good at HTML / CSS and pick it up easy. The countdowns that I have seen on the internet
Getting the attributes of a div?
I'm using a jquery plugin called jplayer. I need to "bookmark" the current track. The only way to know the current file playing is to look at the div called jplayer_playlist_current. <li class="jplayer_playlist_current"> <a href="#" id="jplayer_playlist_item_1" class="jplayer_playlist_current">Introduction and guidance on usage</a></li> What I want to get from it is the id, ie: jplayer_playlist_item_1 I thought that this might cover it: http://api.jquery.com/attr/ But nothing I do, no amount of googling
Making things easier...
Hi everyone, Can someone help me how to make my script smaller by creating a function that controlls every textboxes instead of one textbox. See below my code that I want to make it smaller... $(".searchField").focus( function() { $(".searchField").css('border', '2px solid #4188c4') }); $(".searchField").focusout( function() { $(".searchField").css('border', '2px solid #ccc') }); $(".usernameField").focus( function() { $(".usernameField").css('border',
to define a var by .get()
... <div id="imageblock" style="position:absolute; top:200px; left:150px; width:676px; height:450px;"> <img src="001_img.jpg" title="pic1" style="display:block"/> <img src="002_img.jpg" title="pic2" style="display:none;"/> <img src="003_img.jpg" title="pic3" style="display:none;"/> <img src="004_img.jpg" title="pic4" style="display:none;"/> <img src="005_img.jpg" title="pic5" style="display:none;"/> </div> <div id="texter" style="position:absolute; top:200px; left:850px; width:150px;
Flash of Unstyled Content with Tabs - Please help this newbie!
I've gotten some very useful help on this project already - thanks, guys! But I'm getting that pesky FOUC and I can't seem to shake it. Here's some code, which is the demo with what I thought was the way to prevent FOUC according to the documentation: <div id="tabs" class="ui-tabs"> <ul> <li><a href="#tabs-1">First</a></li> <li><a href="#tabs-2">Second</a></li> <li><a href="#tabs-3">Third</a></li> </ul> <div
Move a HREF value from one TD to a sibling TD, then hide the original TD
Hi all. I have a table which contains multiple rows. The table has an unknown number of columns. One of the TD's in the row has an 'A' tag containing the HREF property " /_layouts/DocIdRedir.aspx? somenumber" Let's call this TDSource and ASource A sibling TD in the same row which has a class of ms-vb-title contains 2 links - the 'A' tag I want to update the HREF property of is in a DIV with a class of ms-vb itx . Lets call this TDTarget and ATarget. The highlighted components are unique per
calculating width of a table row using offset right
hi all, i have a table row, in which there are three elements: a textfield, a button and a drop down box. now i am showing a div on a button click with the width equal to the total width of all these elements. but, in my system, monitor resolution is low; 800 * 600. and when i set the width of the div, its reached till half of the drop down box. but on high resolution in other monitors, the alignment of the div is correct. i have checked it till 1280 * 1024. i want to know the reason of this change
A vertical and horizontal image scroller
Hi there! What I'd like to do is use some sort of jquery plugin to make an image scroller that has a grid of images and scrolls each row and column horizontally and vertically. I'm a bit overwhelmed though and not sure where to start. I want to use fancybox for opening the image so I was hoping someone could point me towards something that would help with the thumbnail scroller? I'm new to javascript but I've done several other scripting and programming languages, the syntax doesn't seem too different.
Have I missed something? ScrollTo issue...
Hi There, I am trying to make a simple scroll to bit of navigation on my website, I have followed this tutorial to the T, and yet there is no scrolling animation present on my site. I have set the 'Options' link up to link to div "title" which holds the 'key advantages' text-where the mud starts. I am just trying to link the 'options' link with the bullet point (left hand side, below the large logo) as a test before I implement scrollto to any of the links at the top right hand side of the screen-so
json and jquery image gallery
hi with the help of various searches, i managed to use an image liding gallery plugin,whereby when clicking the left/right arrow images slide in and out it works fine, though now that i wanted to update my images, i notied that i needed to go into my html and modify it (which was harder than it could be) so (even just for practice) i tried used json to inject all the images, this is the code: $.getJSON('data.txt', function(data) { var len = data.length, i; for (i = 0; i < len; i += 1) { $("#image_container").append(
ne pas afficher les doublons - not display duplicates
Bonjour, je fais une requête dans un fichier xml, mon problème est que la requête ramène bien les éléments, mais je souhaiterais ne pas afficher les doublons... Voici la requête: $(xml).find('marker:has(projet:contains('+recup+'))').each( Merci d'avance Math11 ----------------------------------------------------------------------------------------------------------------------------------------------------------- Hello I do a query in a xml file, my problem is that the query returns the elements,
PATH PROBLEM <ul> with siblings format <a>
Hello I am very close to getting this but I have hit a roadblock. I am trying to style an <a> in wordpress gernerated <ul> want to have the <a> tags of <li> with children to have a different background. I can get to the <li> for both regular and current_page but I can't seem to get to the <a> $('#sideMenu ul li ul.children').parent().css('background' , 'red'); $('#sideMenu ul li.current_page_item ul.children').parent().css('background' , 'blue'); <div id="sideMenu"> <ul id="page-list"> <li class="page_item
From where can I start?
I am new student programmer want to learn JQuery. I have "JQuery in Action" book. But I want some better tutorial. How can I start learning JQuery? Is it better to use JQuery UI for beginners?
jQuery & WordPress Media Manager Question
I am looking for some help around jQuery and Wordpress. I have managed to get the default Wordpress media upload/manager working in a custom plugin I have written. Basically the plugin is a custom post page that allows users to post fitness updates to a fitness blog I run. I wanted to give users the ability to upload GPX and image files to their post. Using the default Wordpress media upload/manager made the most sense. After looking around the web it was pretty easy to implement but I am stuck
Play a mp3 when pressing a submit button
Hi, is there a way without using flash to play a mp3 file when a submit button is pressed? The page is not reloading, the action takes place via ajax, so there is enough space and time to play the sound. How can I do it? Thanks for your appreciated help! heohni
newbie needs help with $.getJSON
hi all, I've got a problem. Normally I use Flash to send and receive json strings. example: send: http://www.client_url.com/reserv?{"method":"login","params" : {"username" : "test@mail.com","password" : "10015"} "id" : "45"} receive: {"result" :{"json_code" :"0","client_id" :""},"error" : "1","id" : "45"} (wrong username or password) or receive: {"result" :{"json_code" :"0","client_id" :"0078"},"error" : "0","id" : "45"} (everything ok) How to this with jQuery? I've tried function callback(result){
requete selective dans fichier xml -- selective query in xml file
Bonjour, je débute actuellement dans jQuery. J'ai réussi a parser mon fichier xml, mais j'aurais voulu pouvoir afficher les données en fonction d'un critère de filtre, une sorte de requête sql : -> select * from 'table' where pays = 'paramètre'. est-ce possible? si oui, comment je doit m'y prendre? voici un extrait du fichier xml: 1. <markers> <marker name="a" lat="55.23076" lng="66.06605" logo="images/a.png" url="http://www.a.ch" details=""> <inst>"a"</inst>
Deselect all but one or two checkboxes
I have a form with two sets of checkboxes. The first is a list of roles on a committee (chair, vice chair, secretary, etc.) The second set of checkboxes is a list of people in those roles. For instance, Todd is our vice chair and Gwen is our treasurer. If I want to have Todd's checkbox selected when I click the vice-chair checkbox, I can do this: $('input[name=toddS]').attr('checked', true); But if I want to select our treasuer, I want it to not only check Gwen's checkbox, but uncheck Todd's (and
Getting event handler to handle newly added elements
I'm new at jQuery and probably misunderstanding something fairly fundamental. I have a table that looks like this: <table border="1" id="classMembers"> <tr><td><a href="#">something</td></td> </table> When something somewhere else is clicked, the following gets executed, and the new rows appear in that table on the web page just fine: $('#classMembers') .append('<tr><td><a href="#">dummy</a></td></tr>'); The following event handler works when I click
"Mouse position tutorial" spam links
Hey, I was browsing the jQuery site and the mouse position tutorial page has some questionable links. I tried to edit the page to remove them, but the page has been locked to editing. Thanks, Rob
Tons of spam links in the documentation
Hi guys, there seems to be a ton of spam links in the jQuery documentation wiki. Have a look at this one for example.
Event when an anchor tag is refrenced.
I've spent a good time looking and have returned empty handed so I figured I would ask if anyone had come across this before. I need to be able to fire an event when an anchor tag is referenced from the url. The complication here is that the anchor tag doesn't exist and there is no element triggering the event. example: when a user attaches text to the page url something like '#foo' the page will jump to the foo anchor tag. If no tag exists it jumps to the top of the page. I need to be able to catch
img dynamic mouseover function.
So far jquery is looking good to me. I can create new dynamic img element, parse xml etc. However, couple of things I would like to know - 1. I don't want to create new Ids everytime. Been from extjs background, is there something that does that automatically ? 2. in the below code .. $(this) refers to an xml node. [code] /// ajax request .... var img = ..... img.mouseover(function() { alert($(this).find('overview').text());
tab with jquery
hi everubody i'm trying to made a tabs. <div class="tab"> <ul> <li><a href="#">Sport</a></li> <li><a href="#">News</a></li> <li><a href="#" class="active">Film</a></li> </ul> <div>Some content go here</div> </div>i have mouse click function $('.tab ul li').click( function(){ } );i want when user click nany li tag so li->a has active class (like html code) and orther li->a haven't
Doubts on saving objects in an array and accessing them
Hi, I'm trying to do something, but I don't know if I'm totally wrong: $(document).ready(function(){ var parray = $("p"); parray[1].addClass("blue"); }); However, this doesn't make any change to my 1st <p> element. Is it because the array that $("p") can't be treated like this? Thanks.
New to jQuery; How do I make this more general
Hi all, I took my first step into jQuery today and have been pleasently suprised. I've done a small script that takes some headlines from a news feed (which are just listed on the site), and made it so it fades between the headlines, and if you click an image below them, all are shown. Seems to work nicely! Now this post is two fold: 1: please rip my code apart - I'm new so... where have I gone wrong, what could be better. I won't cry honest ;) 2: How can I make this more general. I'd like to have
How to test elapsed time.
Don't know how to test for elapsed time. Thanks.
Sending multiple data values
I got something like that: <script type="text/javascript"> $(document).ready(function(){ $('#demo1').quickEdit(); }); $.ajax({ type: 'POST', url: 'quickedit.php', data: {value: obj.val()}, dataType: 'json', success: function (obj) { if (obj.status == 'success') { if (obj.body) { $t.html(body); } } } }); </script> It works great, but I want to send one more value. Code below doesn't work: <script type="text/javascript"> $(document).ready(function(){ $('#demo1').quickEdit(); }); $.ajax({ type: 'POST',
Empty div issue in IE8...
Hello! As my office is launching an iPhone app we ordered, I wanted to make some eye candy ad on our home page using jQuery... An #action div is over a #pub div... When hovering #action, children of #pub pop out separately (iphone, red, black and blue banners) As I'm just a beginner in jQuery, I tried this : CSS body {margin: 0; padding: 0;} #iphone { position: absolute; top: 60px; left: -80px; } #action { position: absolute; top: 60px; width: 155px; height: 406px;
Searching for: Upward Navigation
Greetings, I am a complete neophyte when it comes to coding but a friend of mine saw and effect he would like me to implement. 1. Is this the forum to post these types of questions? 2. Is there a plugin for this I can buy or download for free? The navigation I'm interested in is on the top of this page. ____________________________ Mark
Adding elements to HTML list using jQuery
Hi, I fetch data from a PHP script through jQuery and want to create a HTML list. This data contains the name of a node and a timestamp I want the list to have the following structure: - Node1: 1) timestamp1_1 2) timestamp1_2 -Node2: 1) timestamp2_1 2) timestamp2_2 etc Basically, whenever I fetch the data and the node is already in the list then just add the retrieved timestamp as a "sublist" item. If the node is not in the list create the item and list the retrieved timestamp
trying to do something specific, need some help
Hey whats going on guys? I am trying to implement Jquery on my site and I implemented a small portion thus far and now its time for me to do the main one, and im not sure how exactly. First off my site is here: http://www.glenhealy.com I just uploaded it this morning, Basiclally I made it a "one page site" and I am looking to make the menu "slide" to each different section of the page. its basically a "home" "contact" "portfolio" and an about scrolling down the page. I would like to make only 1 section
jquery toggle() not working properly
hi, i have a div on which i am calling toggle() to show it on a button click event.. initially the div css is set as display:none; now when i click the button first time, the div shows up, but when i click the button again, it hides some one second and again comes back. i tried slideToggle also, but same result. i dont know if its a bug or something is wrong in my code. i tried to experiment with duration of my click. when i use double click, the div will show up once again but it will
Modifying a url before submitting
Hi, Just wondering, I'm using a CMS, and what I want is do a ../ before submitting. My idea is on focusing on a dropdown or textbox, the url will do a ../, so that when clicking submit, I'll be able to see the result I wanted Is it possible?
jquery hover and click image swap
hey guys, im trying to make a navigation menu, that swaps the image extension _off to _on when its hovered, and _on to _click when clicked. for the most part it works fine. the images swap when hovered and change when clicked. However, i want a clicked button to return to the _off position when another button is clicked. Currently they just all stay on _click when clicked. any advice would be greatly appreciated guys. I am a jquery noob! <script type="text/javascript"> jQuery(document).ready(function()
Next Page