How to put an event on the text in a <td>?
Hi all, is it possible to select a text in a <td> and then put an event on it? I can put an event when a <td> or <th> or ... is clicked, but not on the text in it. Here's my trial code: $('th.select').text().click(function(){ // execute code });Perhaps it's an dummy question, but I realy can't figure it out how to do it
set height of a div equal to another div
Hey! I got a problem, i need to take the height of a div named #main and add that height to another div named .sidebar. I'm new to this kind of stuff, but whould it be possible to do this with jquery, if so, how? Thanx!
Autocomplete SQL, requesting advice?
I'm having a problem with an autocomplete that my ASP.NET developer is having a hard time doing, is jQuery suitable to get the following done and how or directions on where to proceed. I have a SQL contacts table and I want the autocomplete connected to it. In order to remove ambiguity for the user I need the following behavior. 1. When a user enters T or C or B the drop down would show any records that the business name starts with those letters, Ex: The Color Box (may be at several locations) and
Appending to appended elements?
What is the proper way to .append to an element that has been appended? I'm creating a unordered list via jQuery and attempting to append list elements to said list but those elements, loaded from an XML file, duplicate themselves when I do this. When I append those list elements to an html element that is hard coded into my html file, this does not happen.
Fade out & Replace problems
I'm going a little crazy with this. I'm attempting to fade out an image and replace it with another image in the same place and I just can't figure it out. Here is what I have. Any help that you experts out there can give me, would be great! Basically, I want the page to load showing image 1, then image 2 would slowly fade in over top of image 1 and replace it permanently. Here's the CSS: .image1 { position:absolute; left:0px; top:0px; width: 864px; height: 576px; float:left;
Multiple File Upload... Eliminate Spaces
Hello Everyone! I am knew to JQuery and I don't necessarily want to learn everything about it. I primarily use HTML and MIVA and through in some miscelleanoues java scripts and other snippets of code I need to use from other languages. With that said, I am using the multiple file uploaded from this page: http://www.fyneworks.com/jquery/multiple-file-upload/#tab-Overview I have it working fine and will attach a database to the process so it will add an entry for each file that is uploaded so that
loading jquery breaks the display in ie7
hey guys, i'm totally new to website developing. trying to build a site for some friends and i have this problem: i wanna use jquery for some effects but as soon as i load it with <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>it breaks my design in ie7.. you can see it at www.athenslindyhop.com/el/classes.html the border grows larger than the page.. strange thing: if i zoom in or out and then back to100%, to design is fixed... any ideas
Feeling daft - help with sliding tabs / resetting css values.
Hi all, I'm an extreme newbie when it comes to jQuery... I have some panels - they slide out when the corresponding tab is clicked. I've used .toggle() to get this working, and animate the right (absolute) position to move the panel left or right. This works fine on it's own, but within the panel, I have to have an additional 'close' button. my script, and I'm sure it's really convoluted, but with my limited knowledge it was the only ways I could think to achieve what I wanted: $(function() { $('a#tab').toggle(
Assign variable to function
I'm trying to assign IPAddress to using the code below: function GetIP() { $.getJSON("http://jsonip.appspot.com?callback=?",function(ipadd){ //var IPAddr; IPAddr = ipadd.ip; return IPAddr; }); } var IPAddress = GetIP()What am I doing wrong? When I alert(IPAddress); I get undefined. If I alert(IPAddr); within the function, it works just fine.
What is {% %} and {%= %}?
Hi, I've come across some browser side code that looks like {% %} or {%= %}. To me this looks almost like jsp but using '{' instead of '<'. Does anyone know what this is? I've tried searching for it but unfortunately search engines consider it all punctuation and ignore it. Thanks for your help in advance!
Any help on identifying a plugin?
Hi there, New to jquery but really want to get learning. Have had a look around at some galleries/menus etc and I was just wondering if anyone was able to tell me the plugin TBWA might have used on their website? Thanks in advance.
How can I add a value to an form input field
Hello I have this script where i call a jquery ajax to calclate something and then put it back in the form input so then i post everything to a php script where it insert it in mysql database. Here is the script : <!--Date/Time Picker --> $(document).ready(function(){ $("input#dep_d").AnyTime_picker( {format: "%Y-%c-%d", labelTitle: "Date"}); $("input#c_off").AnyTime_picker( { format: "%H:%i", labelTitle: "Time", labelHour: "Hour", labelMinute: "Minute"}); $("input#c_on").AnyTime_picker(
How to submit a form using ajax jquery.
Hi, I would like to know how you can use jquery ajax to submit a form without refreshing the page. I do know about the serialization function but would like to see an example of what is submit(). I currently tried to get my form working but but can't get it to work meaning to submit something from the form.
How to Store The $.ajax Response in Some Variable Please Help me ......
Hi guys Please Help me I am facing problem that how to get the result of the Ajax Response in some variable i am using the following code AjaxGet = function (url) { var result; $.ajax({ type: "POST", url: url, param: '{}', contentType: "application/json; charset=utf-8", dataType: "json", success: function (data) { result = data; } }); return result; } Now from above code i want to store the result in some varialbe like below, PM =
How to add images to image gallery?
My gallery is structured like: <div id="gallery"> <div class="galleryRow"> <div class="uPic"> <img /> <p> description </p> </div> </div> </div> I want to generate this thing entirely from data fetched from db. Each #galleryRow can have 4 .uPic -s, after that, I need to add another galleryRow and add pictures inside it, and so on.... Now I have never touched ajax in jQuery and I don't know how to do this in code.... I know I can add list items or
Setting focus to the input element after event
In the code below I am trying to give focus to the 'input.qualifier' element when one of the options under 'select.qualifier' is chosen. The jquery code I'm using at the moment isn't working. Any help would be much appreciated. <!DOCTYPE html> <html> <head> <title>DVD Ambassador — Disc Locator</title> <script type="text/javascript" src="../../scripts/jquery-1.4.js"></script> <script type="text/javascript"> $(function() { $('select.qualifier > option').live('click',
How Can I get this done ?
Hi, Please visit http://www.dell.com/us/p/laptops In the dell site a user can select different features of what he/she wants like screen size, processor speed and and the script gets the products that meets the criteria. I would like to get the same thing done on my site but I don't know where to start. I searched for a ready script that can do this but I could not find it. I thought it would be a good idea to post this question in the forum. Any help will be highly appreciated. Cheers, Kachaloo
Jquery: how to increase css values?
I would like to know how I can increase css values? Like for example the top value. So I can run a loop that would for every cycle increase the css top value causing a element to be displayed downwards. Any ideas how to do such a thing?
.load screws up links?
When I load a page with img tags into a div, the pictures don't load because the page loading the other into the div is in a different directory. Is there a way around this?
Newb help with simple div swap on hover
Hello, I'm trying to do a simple content swap between two divs. I have four links with associated content links (hidden on page load) that I would like to swap out with their respective links when hovered as well as add different classes based on hovered or not hovered. I've tried toggle(), hover(), replaceWith() but can't get anything working, here is what I have, please help. <script src="js/jquery-1.4.4.min.js" type="text/javascript" charset="utf-8"></script> <script type="text/javascript"
Is there a way to stop queuing of show() hide() calls on hover?
I have a simple navigation system, and I am using hover, to show/hide details, but if I hover back and forth too fast between the elements, the animation queues up and keeps executing even when I am not hovering over them. hover(function(e){ $(this).find('p').stop().show('1000'); },function(){ $(this).find('p').stop().hide('1000'); }); I can use stop() on animate to prevent queuing, but doing it like in the code above, stops the animation from even happening. Please suggest
How to get values from a form that has checkboxes?
Hi, In jquery how can I grab values from a forms input checkboxes? I written the code and I think I didn't properly request the object and also does the input need to have a id or a class? I have no id nor classes with these inputs just names.
How to post the value of all radio groups on page in jquery?
I trying to make a simple image gallery, where I have several radio button groups to filter the search results.(I am pretty new to jquery, and started learning it today, so please be patient.) 1) I have tried this code to create an associative array, but the array comes up as blank. Any ideas? $('input:radio:checked').each(function(){ searchCriteria[this.name]=this.value; }); 2) Along with that, can someone show me how to post the data to a php page( using jQuery ajax), using POST method?
Getting Jquery Ajax Tabs to display content pages?
Hi, Newbie question here: I'm having trouble getting the ajax tabs to load content pages. I'm doing something stupid or leaving something out. The tabs display fine but won't load the content they're blank. Here's what I've done. I've copied the following into my page from the demo page: <script> $(function() { $( "#tabs" ).tabs({ ajaxOptions: { error: function( xhr, status, index, anchor ) { $( anchor.hash ).html( "Couldn't load this tab. We'll try to fix this as soon as possible. " + "If this
How do I get a series of objects to fade in sequence?
I have four icons that I wish to face in when the page loads. When the first image is 25% faded, the second will fade in. When the second is 25% faded, the third will fade in. When the third is 25% faded, the fourth will fade in. Since I have never touched jQuery, with the exception of downloading plugins and using them, how should i best go about this? And feel free to make it as simple as possible to explain how it works too, since I will have no clue otherwise and it would help me greatly.
bind specific columns of a table row
Dear all! How to I bind a click function to specific columns of a table row? Btw, this is a (yet not answered) crosspost of http://datatables.net/forums/comments.php?DiscussionID=3185 I currently have this piece of code: $('#example tr').click( function() { // selection stuff here, $(this) is the row }); However, this binds the whole row. As there are checkboxes in the row, I don't want to have the cells containing them bound, too. But, there is a problem: I need to know what row has been clicked
need guides/tips about jquery?
Hi guys!! Are you a Jquery user? I just want to share something. I found a website that might help you on using jquery and here are some of the website's links: [url]http://www.jquery4u.com/basic-syntax/5-[/url] ... ry-syntax/ The link is about 5 Useful Basic jQuery Syntax like: • Hide/Show • Fade in/Fade out • Stop • Animate • Slide Toggle [url]http://www.jquery4u.com/animation-and-e[/url] ... ge-slider/ The link is about the 10 Amazing jQuery Image Slider [url]http://www.jquery4u.com/articles/benefits-jquery/[/url]
A replacement for \u00xx?
Hello, if I want to assign a text to an html element with JS, I'm used to write for instance (backslash)u00F3 if there is an "ó" character. Is there a way to avoid having to type the unicode using jQuery? So i could type the character directly, or at least in an easier way? I'm using Dreamweaver and in a PHP documente if you type an "&" it opens a small window with all the special characters and you just have to chose it, but not so in a JS document. Thank you.
Negation
I can apply a class to anchors that contain images like this: $('#info a').children('img').parent().addClass('myclass'); However, I want to be able to apply the class to anchors that do not have images. How would I change my code to accommodate that? Thanks- george
jquery .get not doing an xhr request! on firefox
Hi,I have just entered the world of jquery and pretty new to javascript too.I have a small javascript snippet like below:- <script type="text/javascript"> $(function(){ $('a').click(function(event){ event.preventDefault(); $.get('/_add_navigation_',function(response){ $('#themaincontents').html(response); }) }) </script> The html looks like below:- <a href="?toaddnavigation">CLICK Me</a> <div id="themaincontents"></div> On the server side I do an xhr header
Is there documentation for using media.js ?
I'm having difficulty all the way round with jQuery in that I find great libraries and plugins, but I don't know where all the documentation or "users guides" for all of these things that are supposed to make life easier. I'm just a beginner. Here's a perfect example of my question: I want to embed an mp3 player in my website to just make a slight brushing sound on mouseover. I have the mp3 file I want. It's about a second long. OK, after much searching I found the plugin called jquerty.media.js.
Using Jquery with wordpress
I'm designing a wordpress theme on a local host and am trying to use a simple jquery function (the first one on the page I linked to) on my main page that cycles through a handful of images, fading between each image. I'm loading jquery using google in my functions.php by using this: if( !is_admin()){ wp_deregister_script('jquery'); wp_register_script('jquery', ("http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"), false, '1.4.4'); wp_enqueue_script('jquery'); } and I'm also doing this
Multiple Fields on single mouse click
I need to get the clicked on field plus another field in the current row of a table.... $(function() { $(".trclick").live("click", function() { $("#flightno").val($(this).text()); //.children("a").text()); }); }) Here is the table code: echo("<td class='tdclick'><a href='#'>$fnum</a>"); echo("<td>$tail</td>"); echo("<td>$stdate</td>"); echo("<td class='trclick'><center><a href='#'>$rev</a></center></td></tr>"); The class of a column in the table is assigned
an online jQuery website builder for dummies
After playing with all of the different jQuery interactions, widgets, visual effects, etc. (on the demo pages), I couldn’t help but wonder of there is an online website builder that would allow me to “easily” create web pages with all of these functions, but without having to do any real programming ?
Why does this not work?
Hi All, I am fairly new to javaScript and JQuery and am wondering why this code does not work? the switch case does not fire. $(document).ready(function () { var numRand = Math.floor(Math.random() * 20); var Name; switch (numRand) { case '19': Name = "c5"; alert(numRand); break; case '18': Name = "b4"; alert(numRand); break; default: Name = "f2"; } }); While this code will? $(document).ready(function
problem with dialog form
hello, i have a dialog from with 4 butons (save,delete,update and cancel) like this: var dialog = $('<div id="frm"></div>') .dialog({ autoOpen: false, modal: true, closeOnEscape: true, width: 450, height: 300, zIndex: 15000, buttons: { save: function() { var a = $("#a").val(); var b = $("#b").val(); var c = $("#c").val(); var date = $(".date").val();
file uploading using jquery
Hi, I am working on asp.net (using c#) project In which required file upload functionality using jquery . I am new in jquery so plz elaborate how i am using the jquery for file upload. Thanks
Adding a active class to a link
Hi everyone, I have this script where if users click on a link it will show that particular link in a slideUp, slideDown effect. For example There are two links and Two divs. Both Divs are hidden to start. If the user clicks link 1, Div 1 will appear. If the user clicks link2 Div 1 will close and Div 2 will appear. My problem I would like to know is how do I add a active state when the user clicks on each particular link. Please help here is my script <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
showing 10 numbers one after the other
Hello, new to jquery here... I have to "fadeIn" 10 numbers, one after the other. Do i have to nest all the "fadeIn" in my code? Like: $('#number1').fadeIn(400, function() { $('#number2').fadeIn(400, function() { $('#number3').fadeIn(400, function() { $('#number4').fadeIn(400, function() { ... until 10 Or is there antoher way to do it. I thought with plain JS, calling a function with a setInterval, but I'm afraid then I'd lose the sequence of effects, because after the last fadeIn
Problem with .css() - invalid object initializer
I have a simple css modification to make and have run into an error. It appears to be correct syntax to me, what is the cause of the error "invalid object initializer": On this line: jQuery("span.slideNav-title", node).css({float:'left',marginRight:'0',marginLeft,'4px'}); Thanks.
Next Page