[jQuery] Dynamic Links
Hi, I am new to JQuery, can anyone help how to generate dynamic links. I have a loop which generate some links and for each, an onclick event is attached, calling a javascript method with some arguments. some thing like this, for(x = 0; x<items.length; x++) <a href="#" onclick="getData(items[x].id);" >Get data </a> how can i generate such a grid using Jquery. Actually i have to display an overlay on each click, and data will be loaded dynamically in the overlay, so how can i pass the ID to the method?
[jQuery] Get the HTML of the current node plus its Inner HTML
Hi, I need to get all the TABLE HTML code within the <body> tag for a content-generating application. I'm trying to use the html() method, but it only gets the inner HTML. I also tried clone(), but does the same thing. Or maybe I'm using it wrong. Here's an example to clarify what I wanted to do: Input ==================================================== <body> some text <table cellpadding="0" cellspacing="0" style="width: 600px;">....</ table> <div>...</div> <table cellpadding="0" cellspacing="0"
[jQuery] any yone know how biocompare styled the thickbox
click signin on biocompare.com anyone know how i can do similar ? tnx sean
How to make my bg image slide without affecting page size?
I want to make my background slide from left to right continuously made up of 3-4 images which keeps on going like: img1 img2 img3 img4 img2 img3 img4 img1 img3 img4 img1 img2 img4 img1 img2 img3 img1 img2 img3 img4 How can I do this...Is there anyone who can provide me an example or help me out through some useful link? Thank you
[jQuery] Cut your mobile bill.
<span style='font-family:Arial, sans-serif;font-size:13px;color:#000000;text-decoration:none;'>Hey, <BR> I use this really great site to send free SMS! <BR> What's even cooler is that - We get paid for cool offers they send.<BR> - We can load up this money on our mobile, encash it or donate it to charity!<BR><BR> It's a really cool idea! Over 30 lakh Indians have joined and have generated over 1 crore in member earnings already!<BR><BR> <b>Joining is free too! Here's the link: <a href='http://youmint.com/network-chan_bomb'>http://youmint.com/network-chan_bomb</a></font></b>
[jQuery] Detecting a redirect response to an Ajax query
Is there any way to be able to detect in $.ajax whether the response involved a HTTP redirect? My backend application times out sessions, and if the next request comes in after the session has timed out, it redirects the user to / signup/login. Unfortunately, if this happens when the client issues an ajax request, the login page gets inserted into the middle of my existing page. I googled around for this, and I found the suggestion that I should just check for the text of my login page and abort
Saving reference to clicked item?
Hey all. I'm pretty new here and pretty stuck on a pretty small issue but it's escapes me. I have a bunch of divs and when you click one I want to save a reference to it, so when you click another it changes the first div back to it's original state. Here's what I got so far... <script> var lastTile; $(document).ready(function(){ for(i = 0 ; i < 25; i++) { if(i % 5 == 0) { $("body").append("<div class='mapTileEnd'><img src='pink.png'/></div>");
dynamic buttons
i have the following divs and input buttons <div id="row_<?=$i?>"> <div id="lesson_<?=$i?"></div> <input type="button" id="button_<?=$i?"></div> </div> but there are a lot of such rows coming in my db so i don't know how many div will be. in order to delete the row in which the button is clicked what must i do?
[jQuery] slideUp(), slideDown() not working in IE 6, 7 on LI elements
Hi all, I posted a week ago about some odd behavior with slideUp() and slideDown() in IE 6, 7, and 8 (the post is here: http://groups.google.com/group/jquery-en/browse_thread/thread/1b4cda051e732376/87cb9b7657b7a4a3 ). After several hours of further investigation, it appears that jQuery isn't properly animating LI elements. I set up a simplified example here: http://69.59.182.148:4080/test/07152009/index.html The first two examples on this page show slideUp() and slideDown() on LI elements. In Firefox,
[jQuery] Fade in and then fade out element when using slideToggle
I have a div (#slide-panel) which is hidden by default (display:none) but shows up when a button (.slide) is clicked. Inside the div I have a h3 which also is hidden by default (display:none) but fades in as the div slides out. Here's the code: $(".slide").click(function(){ $("#slide-panel").slideToggle("medium"); $("#slide-panel h3").fadeIn("slow"); $(this).toggleClass(".slide-active"); return false; }); Is it possible to make the h3 fade out as the user press the button (.slide) and
Problem with XML
Hi guys, I have an AJAX request which passes back some xml data, at the moment I am only interested in one of the nodes, so I do var onlyChartData = jData.find ("chart"); This appears to work fine as I can $(xmldiv).append (onlyChartData); and it's appends it to the div. However I cannot alert the data from onlyChartData, using .text or anything. I'm using FF. This leads me on to my next problem. I am using FusionCharts, and for some reason whatever when I call setDataXML or UpdateChartXML on a fusion
Update FF to 3.5.1
Big hole in FF 3.5 patch it to 3.5.1 to stop it.
[jQuery] jQuery Form plugin with Yahoo UI
Hi, When I add the jquery.form.js plugin from malsup, my Yahoo UI TreeView won't render anymore ... There seems to be some conflict. Is there any workaround for that ? Thank you for any help. -- View this message in context: http://www.nabble.com/jQuery-Form-plugin-with-Yahoo-UI-tp24530556s27240p24530556.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] select draggable
Trying to get the draggable ui working with a multiple select field, but doesn't work. Does it actually work with option fields ? $("select option").draggable(); it adds the ui-draggable class to the options fields, but they are not draggable :(
[jQuery] animation is getting slower.
hi, i was just playing around today with some animations. this is my code (js): $("#boden").mousemove(function(e) { var pageCoords = "( " + e.pageX + ", " + e.pageY + " )"; var clientCoords = "( " + e.clientX + ", " + e.clientY + " )"; $("span:first").text("( e.pageX, e.pageY ) - " + pageCoords); $("span:last").text("( e.clientX, e.clientY ) - " + clientCoords); $(this).click(function() { var bodenoff = $("#boden").offset(); var balltop
[jQuery] Large file upload problem for form plugin
Hello. I'm using jQuery form plugin and there seems to be a problem with files larger then approximately 10mb. If I try to upload a file that's smaller then that it does everything correct, but if it's larger then it just returns empty $_POST and empty $_FILES. Any ideas on what may be the problem? Here is the code: $("#facebox #content_container").ajaxSubmit({ success: function(data) { console.log(data); } });
Getting the index of an element ".eq(x)"
Hi everyone! New to JQuery and Javascript Libraries in general, I experimented and learned a lot of things in the last couple of weeks. Now I'm struggling with what I presume is a simple problem: I want to get the index of a link when the user clicks on it. Javascript code: var myArray = ["a","b","c"]; $("#buttons a").click(function(){ var result = myArray[$(this).eq()] alert(result); }) HTML code: <div id="buttons"> <a href="#" id="btnA" class="btn">button1</a><a href="#" id="btnB" class="btn">button2</a><a
Validate Plugin - Adding a promo message
I want to add a promotional message when the user clicks submit if they meet some criteria which is certain postcodes. I have written the regex which is /^[TA]{2}([1-12]|17|22|25){1,2}/ The message will be something like "You have been entered into a competition to win a special gift" but I'm not sure how to add this to my script. This is the script so far $(document).ready(function(){ $("#orderForm").validate({ onfocusout: function(element) { this.element(element); },
[jQuery] superfish arrows only on sub menus
anyone know how to modify the superfish script so the auto generated arrows only appear on the sub menus?
Date picker help
Hi, Im a newbie to jquery and wanted some help. I have a date field which i want to be autopopulated with todays date but in the 'YY-MM-DD' format , I can get this working from user input but when i add the bold code the autopopulated date isnt in the correct format??? $(document).ready(function(){ $("#datepicker").datepicker({dateFormat: 'yy-mm-dd'}); var myDate = new Date(); var month = myDate.getMonth() + 1; var datepicker = month + '/' + myDate.getDate() + '/' + myDate.getFullYear(); $("#datepicker").val(datepicker);});
[jQuery] Disabling Button in jQuery HTML Form Plugin
I am currently using this plugin http://www.malsup.com/jquery/form/#code-samples (HTML) to display a div with content, depending on what is entered. Is there a way to disable the submit button if the div contains a certain message?
[jQuery] Problems with two Superfish menus
Hi guys, I had a problem when I tried to use two Superfish menus. This problems just occur when I use Internet Explorer 6. Please, visit this URL to see the screenshot that explain everything. My HTML doesn't have any special structure to cause this problem. Can someone give me some idea about how to "solve" this problem? Regards, GB
Fading in on Page Load
I am trying to do something which seems simple enough but for whatever reason I can't get it to work. Here's the problem: I have a div box on a page that had 6 images absolutely positioned in it. When the page loads I want the whole box to fade in at once or in some kind of order. I've been trying just to fade everything in at once using this: $(window).load(function () { $("#leader").fadeIn(500); }); And that it does nothing. The CSS for the box is just this: #leader{position:relative; height:400px;.
[jQuery] [ treeview ] lazy ajax with unique
Hello i use treeview plugin with lazy ajax. if use "unique" option it reload all items of current level that has children, when open one of item. so it could be about 20 ajax queries at one time. is it possible to set one open click one query?
[jQuery] Cycle Plugin ScrollHorz effect problem in FF
I'm using the Cycle plugin and really like the "scrollHorz" transition effect since it scrolls left/right appropriately when using the pager navigation. But I'm having a strange problem with the very first transition when viewed in FireFox (v 3.0.11 on Mac as well as 3.0.11 on WinXP). You can see the page here: http://tinyurl.com/mmddkn The main content to the right of the vertical image on the left side of the page is what is being animated. If you click "Begin" at the bottom right of that content,
How to access the "True" "this" of an ob
If "this" inside of a sortable "receive" function refers to the receiving object, How do I access the object to which the receive function belongs? Example: // Function that takes a JQ object and makes it sortable. // We assign the "SortableRecieve" method to the receive event MyObject.prototype.MakeSortable = function(JQOBJ) { JQOBJ.sortable({ receive: this.SortableRecieve }); } MyObject.prototype.DoSomething = function() { // Does something important } // The actual function
[jQuery] Convert single click to double click?
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>emailsig.html</title><meta name="viewport" content="width = 400, minimum-scale = 0.25, maximum-scale = 1.60"><meta name="title" content="html email signature"><style type="text/css"> <!-- body { margin:0px; background-color:#fff; height:100% } html { height:100% } img { margin:0px; border-style:none } button { margin:0px; border-style:none; padding:0px; background-color:transparent; vertical-align:top } p:first-child
[jQuery] Can't iterate through SPANs and execute Ajax GET
As soon as the page loads, I would like to iterate through several span tags on the page and update their innerHTML to be the response from the AJAX get call. The line I have commented out, alert("Data Loaded: " + data);, works perfectly, but creates a bunch of alert boxes (which I don't want). And if I move the line "this.innerHTML = data;" out of the Ajax call, it works fine also. So I know all the syntax is correct. But when I put it together as outlined below, it just won't work. The Ajax is
[jQuery] Recoving failure on request submission
Hi everyone, First, I have to say the jquery form is just perfect and fills very well a common issue for those who need to work with ajax. I would like to know, or even sugest a new feature if it is the case: how can we get, on client side and after an 'ajaxSubmit' call, the error code produced on server side? Is it possible to include such function on jquery form? Because we already have a 'success' callback functionality, how about a 'failure' one?
[jQuery] tablesorter not sorting numbers correctly
tablesorter isn't sorting numbers correctly. I have the latest jQuery (1.3.2) and tablesorter (2.0.3). from http://abitibi.sbgrid.org/: <script type="text/javascript" src="/js/jquery-latest.min.js"></ script> <script type="text/javascript" src="/js/ jquery.tablesorter.min.js"></script> I am turning on tablesorter on *all* tables using: $(document).ready(function() { $("table").tablesorter(); }); Then my tables have no other class or id attributes. I simply use thead/tbody and th elements. You can
[jQuery] Create a Select Box
So ive got a fun page where I need to create the dropdowns based on an array I pass into the html. (coming form php) However I cant figure out how to actually create a select box... I can however populate a select box that exists... Before Jquery does its stuff <ul id="filter"></ul> So heres what I need the end to look like after jquery has run its stuff <ul id="filter"> <li id="select_1"><select name="select_1" class="filter"><option value="1">1</option></select></li> <li id="select_2"><select name="select_2"
[jQuery] Newbie question
Hello, I have just discovered jQuery and it looks cool. I used the jQuery UI builder at ui.jquery.com to build the UI and it looks and works great :) Unfortunately I do not know enough about javascript to answer my own question, so I am deferring to you :) I would like to have a tab with a dialog button on it, and when that dialog comes up there will be a form. This part I can do easily enough and have already implemented, however, what I need to do after that is where I am stuck :( I want the user
slideUp / slideDown / Filter Issue
Hi all, I've been working on this project for quite a while - and keep having to leave this part of it - only to be stumped every time I come back to it. I have a nav w/ subnav links. And on the page - I have panels with a header (<h3>) and body (<div>) which is shown/hidden by clicking the respective header. The subnav links can also show/hide the panel body divs - as well as toggle a class on the header h3s. And this is based on the Text of the subnav link and h3 matching. Everything works great
Help with Auto Tab Plugin
Hi all, I'm stuck with something that seems so simple. I'm working with an AutoTab plugin: http://www.lousyllama.com/blog/jquery-autotab-11-beta-ready-testing I'm trying to get it to work for IP Addresses - so Auto Tabbing should happen when one of two things happen: 1 - 3 numbers have been entered - this works now; 2 - a '.' is pressed - right now '.'s are simply deleted. I like that - but need the Auto Tabbing to happen as well. I left a comment on the develper's site and he helped out some. But
[jQuery] Doing something before the get request
This example is not clear enough (at least for me..) http://docs.jquery.com/Ajax/ajaxSend I want something simple such as the user clicking and a "waiting.gif" image is presented in order to let the user know that the server is working on it. $.get("file.html", function(data){ $("#msg").html(data); }); How do I get the ajaxSend to work with the above code (above code is working). Thank you
[jQuery] Fading background images in and out
Hi, Just wondering what the best way to cycle (fade in and out) background images is? I´ve got to create a homepage with a navigation and nothing else but background images fading in and out behind it. I was going to use the Cycle plugin for Jquery, but it means I need to create a div with images in it and I can´t seem to keep them in the background only (i.e. the z-index doesn't work). Any ideas of how to keep the images only in the backgroun/stop them obscuring other elements on the page? Thanks
[jQuery] help w/ plugin
I have created a plugin called replaceClass, found at http://plugins.jquery.com/project/replaceClass. However, this works only on hover and I would like to broaden the trigger to include more events. Also, it would be nice to work with id's as well. Any help is appreciated and I am happy to move the code to a site like github if that helps. But more importantly, I wonder if this functionality already exists in jQuery. I created the plugin (my first, btw) because I could not find a built-in way to
[jQuery] jQuery Conference 2009 Registration is Now Open
We're happy to announce that registration for the jQuery Conference 2009 is now open. The yearly event consistently sells out quickly due to the quality of information being presented and speakers in attendance. This year should be no different. The two day conference (Yes it's now 2 days!!!) is taking place Saturday, September 12th and Sunday, September 13th at Microsoft Cambridge in Boston. The registration fee is $150.00(USD) and will help cover the cost of the venue, food and beverages, and a
Used Validate Plugin and external file
I am very new to JavaScript and even newer to jquery. I have written a script using jquery and the validate plugin. I need to put this code into an external js file. Is this achieveable? How do I call it in the html file? Thanks
[jQuery] cluetip onMouseOut Stick problem
When sticky: true and mouseOutClose: true are set the cluetip doesn't always close when you mouse out. Look at the example on the JQUERY DEMO PAGE: http://plugins.learningjquery.com/cluetip/demo/ Look at jTip Theme, 1. jTip Style clueTip, with slideDown effect and an image placed in the title for closing it, because it's sticky. New: The clueTip will close if you mouse out of it. The only way I can get the cluetip to close is moving the mouse on top of the cluetip. Anyone else have this issue and
Next Page