how can i link object between each other
Can onyone tell me what i'm doing wrong?? In the line 42 I get an error "t.slider is undefined". $(window).load(function() { var s = $('#GallerySlider'); if( s.length != 0 ) { var mu = $('img.mu', s); // move up button; var md = $('img.md', s); // move down button; var sc = $('div.sc', s); // slider content; if( mu.lenght == 0 || sc.lenght == 0 || md.lenght == 0 ) jQuery.error( "ERROR" ); // slider definition; s.content = sc;
Handling Multiple Jquery functions
Hi guys sorta new to jquery i was having some problems with updating my using jquery i have 2 onload xmlhttprequests that trigger every 20 and 30 seconds and i also have tabs on a footer bar that open a new request. i have everything working ive loaded my site on firefox and internet explorer and sometimes the divs that display the refreshing content get mixed up with each other. im thinking i have to many requests open. since theres about 15 tabs on the bottom when you click it , you set a interval
Very simple question concerning displaying titles
Firstly I've used jquery for about an hour now so that's how little I know, that's why this should be simple as :) Ok So I've been reading the docs on ids and ".attr"'s and have achieve half of what I need to do. I've used this: $(".main_view").text($(".test2").attr("title")); to get the title of an image and then display it. This works fine except it gets rid of the image. I want to be able to use display the image and use the title as a caption. After I've achieved this I'd also like to be able
Jquery UI Tabs Pass AJAX function calls inside a PHP loop
I am trying to pass ajax function calls inside a PHP loop so I can pass a database identifier to all tabs. <?php $linktext=some data from the database $Idnum=a datarow ID <a href=\"#intro\" onclick=\"getlisttext($IDnum),getlisttext2($IDnum)\">$linktext</a> ?> The idea is that each tab's content will come from a different query and need to pass $Idnum to each ajax function. The tabs work great but the onclick event will only pass one function call. I need all the function calls to be made inside
How to loop through replacing span with XML array items
My website has a flash animation I'd like to replace with a jQuery animation (www.theshredstop.com). I'm trying to create a dynamic statement to grab an array of words from an XML file and loop through replacing the word in a <span> with a random item. Would like it to loop continuously while the page is displayed. The HTML statement is: <p style="text-align: center; font-size: 2em; font-weight: bold; margin: .5em,0,.5em,0;"> <span>Shred your </span><span id="indexShredItem">paper</span><span>,
need big help with AJAX
On this page, when you mouseover each of the 64 figures, a number appears below the figure: this is done with some economical jQuery. Next step is to have each of the numbers, when clicked, to launch a different styled div into a div on the left side. There's an extra wrinkle. When the number is clicked, the sequence of events should be: whatever is in the target div on the left disappears; there's a pause, approx 800ms; and then the selected styled div appears in the target div. And ideally,
Can't store to a global vaiable
I am calling a PHP script and trying to store the results to a Global Variable for use in later functions. But It doesn't seem to be saving the results to the variable. I have found, that within the ajax success call it will display the proper information. Outside of the AJAX success (whether in the function or outside of it) the variable is listed as undeclared. Info={}; $(function(){ GetInfo(); console.log('After GetInfo() in Main: '+Info); console.log('Info[\'GotInfo\']='+Info['GotInfo']);
Hello and about the polaroid.com eye-candy
Hello everybody, i'm new here, new to javascript, new to jquery.... most of the time i am building with PHP.... but for some more graphic solutions i went to search the web a bit more and found this place... and wonders you can do with jQuery :-) i'm lovin it! so i was surfing the other day and came across polaroid.com. they got a very nice website build in flash, with some javascript.... but this must be possible without using flash....why? i just don't like flash! i want code and i want it to
help with $ajax and json
hi there! I'm a bit new in jquery using $ajax. I'm implementing it using json. I'm using the automcomplete in combobox I have a results.aspx which return json results. I just want it to display the results in the combobox autocomplete. the red part of the code is a bit confusing me on how can I do it. Actually I don't know how to handle the success part... Here's the code: <SCRIPT type="text/javascript"> (function ($) { $.widget("ui.combobox", { _create: function
help with image rollovers please........
Hi, I am a comlete beginner to pretty much all things web design and am trying to construct my first website. I am attempting to hand code it without the use of a CMS. I am trying to make an image change on mouseover for my top nav menu, and have the following jQuery functions: $(document).ready(function(){ $(".navlist img").each(function) { rollsrc = $(this).attr("src"); rollON = rollsrc.replace(/.jpg$/ig,"_link.png"); $("<img>").attr("src",rollON); $(".navlist a").mouseover(function(){
Using javascript in Jquery
Hi all, This is my first post to this forum. I had some javascript that was working great and then I added some jQuery that works great on its own but the two don't work great together. So now I want to embed the javascript in the jquery. But it's harder than I thought. Here's what I've got: $(document).ready(function() { $('#submit').css('display', 'none'); $('#deepshare').click( function(e) { $('#submit').css('display', 'inline'); e.stopPropagation(); $('#deepshare').css({color: '#000'});
$(this)?
So, I've just recently become enlightened by jQuery and would like to add it to my site, but I'm having a little trouble. I made this basic function: function showPanel(id) { var panel = $(".further_info." + id + ""); panel.slideToggle(); $(this).toggleClass("minus"); $(this).toggleClass("plus"); }To give an example of its use: <a class="panel_control plus" onclick="showPanel(0);"></a> <div class="further_info 0">blah blah blah</div> The panel is displayed correctly, but the classname
.load div from a file contains another div
$("#content").load("code.php"); code.php is: echo '<div id="1"></div>'; How could i use jquery functions on the loaded div tag #1?
What's wrong with this page?
I wrote this small page and for some reason when I cilck on the submit nothing happens (checked on firebug, no submit is happening) <html> <head> <script type="text/javascript" src="jquery-1.4.2.min.js"></script> <script type="text/javascript"> $('form#login').submit(function() { $.ajax({ type: 'POST', url: 'http://my.site/login.php', data: this.html(data), success: success,
You destroyed my site !!!!!
My site is completely unavailable because of you! You bitch! I use Google Analytics to the site and I got your code. Now waiting for a page write code.jquery.com WTF?? I do not want your services or your code on my site !!!!!!
append hyperlink
hello all, i'm brand spankin new to jquery... i'll eventually catch on, but in the meantime: i'm sure there's a good way to append a hyperlink, but i'm in the copy/paste/play-with-til-it-works mode and started with something like: $("#data").append("<div>" + $(this).attr("Title") + "</div>" and sucessfully converted that to append a hyperlink with onclick event: $("#data").append("<a onclick='asdf()' href='#'>" + $(this).attr("Title") + "</a>" but i can't add a parameter to the asdf()
Passing variables and making a plugin
Ok, so I used this jquery, and i want to be able to pass a couple variables in and make a plugin from it: so heres my scripts: <script type="text/javascript"> $(function() { $('#head h1').removeClass('hover_title'); $('#head h1 a').append('<span class="hover" />').each(function() { var $span = $('> span.hover', this).css('opacity', 0); $(this).hover(function() { //on hover $span.stop().fadeTo(300, 1); }, function(){
Drag & drop
I'm looking for a drag and drop system, but i couldn't find anything specific. Basically i want to have a menu on the left with DIVs in it. I want to be able to drag that DIV and place it in a menu on the right. But when i do that i don't want the DIV that came from the left menu to disappear from that. So when i drag an item i want to create a clone of it. Hope that made some sense... Can someone please help me out with this??
passing a form or querystring value
Hi i am using the jquery image upload and C# from this example http://valums.com/ajax-upload/ i need to get hold of form value and a querystring value i have tried int compId = int.Parse(context.Request.QueryString["id"].ToString()); but i get a object reference error, any ideas what i need to do?
Display another drop down list after select one
I'm a newbie. I have just working with jQuery for 2 hours. For example I have a drop down list like this: <select> <option>Fruit</option> <option>Color</option> </select>If I select Fruit, another drop down list appers and give me some selections: <select> <option>Banana</option> <option>Orange</option> </select>And if I choose Color, one drop down list show me colors like Red, Green, ... to choose. Can I do this with jQuery? Now I can only display what user choses like "You chose Banana". "You chose
Problems with jQuery $.each
Hey, I've been trying to use jQuery each to count the total height of all elements with the same class. The code below does not work and the alert that I put in for debugging always returns as 0. Any help would be appreciated. var current_th = 0; $('.noteWindow').each( function(index, domEle) { var current_th = + $(this).height(); }); alert(current_th);
Tabs and accordion not functioning
This is the first I have used jquery, and want to include both tabs and accordion on the page. I followed the documentation, but the output does not show the tab or accordion in the proper format. The sample page is located at: http://www.huntersdomain.com/index.php?a=28&b=139 If anyone would help tell me what I might have done wrong, I would appreciate it. Thanks! Fran for Hunters Domain
selecting all the checkboxes inside a form
Hello, When I submit a form, I need to known wich checkboxes are checked. How can I do that?? <form id="selemployee" onsubmit="checkemployee();return false;"> <table border="1"> <thead> <tr> <th>Sel</th> <th>Apellidos</th> <th>Nombre</th> <th>Seccion</th> </tr> </thead> <tbody> <tr> <td><input class="check1" id="check1" type="checkbox" value="1" /></td> <td>Garcia Garcia</td> <td>Ferando</td> <td>Administracion</td> </tr> </tbody> </table> <input type="submit"> I tried with: var
Some help please..
So I have an "Image Approval" page that I'm attempting to use jQuery on to submit the forms. I am running into issues because there are multiple forms on the same page as well as two different submit options - one for "Approve" and one for "Delete". I tried setting each button to its own function approve() and delete() but the problem I am having is being able to pull variables out of the specific form that was submitted. I've tried doing something like this: function approve() { var name = $(this).parent("form").attr("name");
JQUERY 1.4.2 documentation needed...
Hi, Can anyone pls mail me JQUERY 1.4.2 documentation or related materials. My Email ID:- kajubadam25002@gmail.com
Including jquery.js inside plugin, not html
Forgive if this has been asked a hundred times, I couldn't locate the answer using search. So html has this: <script type="text/javascript" src="jquery.min.js"></script> <script type="text/javascript" src="myplugin.js"></script> I'd like to move the jquery.min.js include out of the html file and into myplugin.js. Is there a reliable method? Cheers
? display in the browser
Hi All, I just started to learn jQuery. I have downloaded .js files and .html files from the site. My question is all files are working fine on my machine. But I want to display all the messages in my local language. But when do that it displayed '?' in the browser. Can anybody knows the solution? Please tell me if you have. thanks
toggle not working in chrome
I have this in an external sheet $("a.star").click(function(){ var url_id = $(this).attr('href'); $(this).toggleClass("not"); $.ajax({ type: "POST", url: url_id }); return false; }); It simply toggles a empty / full star and saves the choice to db. Works in FF, and IE but not in chrome or opera. Any ideas?
Problem in simple JQuery code
I have got a probelm in this JQuery code. It does not run in any browser(have JS enabled) <html> <head> <title>Select a paragraph</title> <script src="D:\JSQuery\jsquery.js"></script> <script type=”text/javascript”> function stripe( ) { $(‘#third’).toggleClass(‘striped’);; } </script> <style> striped { background-color: red; } </style> </head> <body> <h1>Select a paragraph</h1> <div> <p>This is paragraph 1.</p> <p>This is paragraph 2.</p> <p id='third'>This is paragraph 3.</p> <p>This is paragraph
Where to find a list of all functions in Jquery
I have not been able to find a list of the functions in Jquery...probably not Googling for the correct phrase. Todd
What does passing a function to the $() do and where do I find this in the docs?
I see that sometimes functions are passed into $(), e.g. $(function() { $('#tabs').tabs(); }). What does this do? Does it just evaluate right away and is just a guard to prevent something from running if jQuery wasn't loaded? Does it evaluate on body load? Those are all my guesses. Where in the docs do I find info about this? Thanks!
close datepicker when input loses focus
Thanks for taking the time to read my question. At the moment, I have datepicker working on my page, and I really like it. Thanks to the very smart people that figure all that stuff out. When I tab through my form, and the date field receives the focus, the calendar opens. I pick a date and it closes. but some times I'm tabbing backwards through a form, or tabbing over a date field that already has a date in it, and just want to "tab on by". Datepicker open when the date field receives the focus,
I don't get the jQuery to work!
Hello! Im about to try learning to script in jQuery and .php. I have tried alot of different aproches to solve this one but i think im stuck. This is the code: index.php <html> <head xmlns="http://www.w3.org/1999/xhtml"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <script src="script/jquery.js" type="text/javascript"></script> <script
Adding a stop() and a way to do a restart to a FadeIn and FadeOut
I am trying to understand Jquery and I have this: $(function(){ $('.fadein img:gt(0)').hide(); setInterval(function(){ $('.fadein :first-child') .fadeOut(1000) .next('img') .fadeIn(1000) .end() .appendTo('.fadein'); }, 5000); }); And I would like to stop and restart it. Is that possible? Can you point me to a article discussing it? Many thanks... Todd
Datepicker close
Thanks for taking the time to read my question. On my form I have a date <input />. When that input receives the focus, datepicker displays the calendar. The user can select a date, and the calendar goes away. 2 questions. 1. Is there a way to move the focus on to the next field after the date has been selected? 2. If I am just "Tabbing by" the date field, and don't want to edit or add a date, the calendar appears, and stays open even if I keep tabbing, and the focus leaves the date field. Is there
From JavaScript to jQuery!
var country = "Poland"; document.getElementById("___country").value = country; document.getElementById("___countryClicker").getElementsByTagName("SPAN")[0].innerHTML = country; document.getElementById("___countryDetails").value = country; window.location= "j<strong></strong>avascript: manipulateForm('"+countryCode+"');"; This is code that I wanted to convert to jQuery but I dont know how to do this.? Can somebody explain me how or convert it to jQuery?
Auto selection script in jQuery
I have a script which autocomplete my form but I have a problem. 3/4 part of form is normal field but country is to choose from list. This is selection list or something like that. I show part of my script. $('form[name=shippingForm] input').each(function() { switch (this.name.replace(/[^a-z0-9]+/ig, '')) { case 'state': this.value = 'PL'; break;But how to write that will be choose country? Maybe I will show part of html code from form site. <div id="countrySelector" class="ssClosed"> <a href="#"
Loading content + fading to does not work in IE, but does in FF and chrome ?!
Hi At my page I use buttons, part of the div menu, to load content in an other div (contentArea) with jQuery. When loading this content the text "Loading..." will appear in the loading div on the same page. At the end of my index page, just before </body>, i use the following code; <script type="text/javascript" src="jquery-latest.js"></script> <script type="text/javascript" src="menu.js"></script>Menu.js: $(document).ready(function(){ //References var sectionsvar = $("#menu span"); var
htaccess blocking jQuery request
Hi all, I have a problem with htaccess blocking a jQuery form request. I use the following jQuery to process a form when the submit button is pressed [code] <script type="text/javascript"> jQuery("form").eq(0).ready(function() { jQuery(".submitform").submit(function(){ jQuery.post("includes/process_form.php", jQuery(".submitform").serialize(), function(data){ if(data.email_check == 'invalid'){ jQuery("#error").html("<div class='errorMessage'>Sorry
jquery.click function problem
Hello, I'm trying to do the following: when a user clicks on a checkbox an alert message box must appear. I have try with the following code but does not work: <h3>Listado</h3> <p></p> <table border="1"> <thead> <tr> <th>Sel</th> <th>Apellidos</th> <th>Nombre</th> <th>Seccion</th> </tr> </thead> <tbody> <tr> <td><input id="check1" type="checkbox" value="1" /></td> <td>Martin Martin</td> <td>Enrique</td> <td>embalajes</td> </tr> </tbody> </table> <script> jQuery('#check1').click(function()
Next Page