Fade out after a certain time.
Hi, I'm trying to make notice bars at the top of the screen that can be called with a function and fade out after 8 seconds. Everthing works fine for 1 bar, but when I create more only the last one fades out at the time the first one was supposed to fade out. Code: http://pastebin.com/t6VqcmLR Thanks for taking the time to look at my question.
.live with AJAX problem
I have a table. Each row comes from a MySQL database and contains an anchor with the css class .block If you click on one of these anchors, it will perform a AJAX $.get and respond with the content relevant to the specific row that was clicked. This content is another table of database-driven content. In order to allow my user to re-order this content, each row contains a link for 'Up' and a link for 'Down'. As an example, the 'Up' anchors have the class 'productsimageup' and when clicked, AJAX $.get
Strange unintended loop
Hi, I'm working on a new portfolio site (dont click it yet! read warning below first :)) http://viewmy.info/new/ There are 3 areas that I change in rotation (top header, then bottom left images, then bottom right images, then loop), it works fine the first time round but then the second time the callback to show the bottom right images after they have changed loops itself infinitely. All the JS is in http://viewmy.info/new/js/frontpage.js , I've added three alert()'s to figure out where it was going
JSON array
Hi there, I am new to jQuery and could not get the JSON data. Can anyone help me please. Thank you. for example, I would like to get and use data from array bidround2: state ------------------------- hand1.html file conaining JSON data: { "bidround1":[ { "state":"cont", "bidw":"u", "bidn":"1", "bide":"1", "bids":"dbl", "alertw":"a" } ] "bidround2":[ { "state":"cont2", "bidw":"u2",
Jquery Fault
Hi all, Just installed jquery slider but I am getting a error in IE at the bottom left. Can anyone offer me advice? www.webkeydesign.co.uk Cheers, Lee.
How can swap the content within a div without affecting the other divs with the same class
I have a listing of items on the page and each one has a <div> with a description in it. There are two versions of each description, one short and one full length. I like the user to be able to swap between them by clicking the 'more' and 'close' links. I have started the script but need some help to perfect it. The problem with what I wrote is that it applies to all the divs on the page instead of the specific one that was clicked. What can I change to correct it? The jQuery: $(document).ready(function()
Google Chrome vs IE7
I am using Google Chrome, there are no any problems with jQuery UI, I have also add meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" but in IE7: 1. Button is always square in IE7 but Chrome has circle horn .... 2. This 'textbox' not work: $('#LoginPassword').click(function () { var oldBox = $(this); var newBox = oldBox.clone(); newBox.attr('type', 'password'); newBox.insertBefore(oldBox);
How to submit a form in modal form
Hi Im new to JQuery and want to know how i can submit a form that is in a JQuery Dialog Modal Form. I have a button on my main page, which opens up a modal form, with a form inside. Here are 2 snippets from the code. <script type="text/javascript"> $(function(){ // Dialog $('#dialog').dialog({ autoOpen: false, width: 330, buttons: { "OK": function () { alert("FORM SHOULD SUBMIT HERE"); }, "Cancel": function() { $(this).dialog("close");
How to iterate over this strange JSON
Hello all, I am pretty new to using jQuery, so I am sure this question will be pretty easy. I have a JSON string I need to iterate over, however it is a little different looking than your normal JSON. I mean it validates in JS lint, so it is fine, I don't don't know how to loop over it and work with it. I need to loop over every row found in the "DATA" section and add a new radio button representing that row, and the details about the time and address (found within the JSON). Here is what it looks
How can i use $.post or $.get from subdomain
Hello, i have a problem when using get or post from subdomain. I have a file included in header: functions.js. in this file a have a function similar to: function popup(thevar,json){$.get("http://www.domain.com/ajax.display.php",{thevar:thevar,json:json},function(data){alert(data);});}It works fine, but when i try to use this function from subdomain.domain.com it fails with no error. Is there a way to resolve this so that i can call the function from any subomain?
Option Creation and selecting not working in IEx
Can someone tell me why this snippet of code does not work in any version of IE yet works fine in Firefox and Chrome? <? require_once("db/db.class.php"); $db = new db_class; $classId = intval($_GET['classId']); $selSub = intval($_GET['selsubclassId']); $d = $db->connect(); $q = "SELECT sub_class, short_name FROM material_classes WHERE class = '".$classId."' AND sub_class != '0' AND sub_sub_class = '0'"; $r = $db->select($q); $options = "<select name=\"sub_class\" id=\"sub_class\" onChange=\"getSSC($('#itemclass
How to get width of DIV if display:none?
Hi all. A few times I have had the need to get the width, height, or position of a DIV before using an effect (slideUP, show, etc). I found that in order for the effect to work I was required to use display:none which works great for the effect but I can no longer get the DIV's properties until it is displayed. So in this question I am asking if it is possible to get the properties of a DIV when display is set to none. (in another question I will ask about the requiring of display:none for using
Cascading selects and reloading values on postback
Hi all, using jQuery 1.4.1, ASP.NET MVC and a great little plugin called jquery.cascadingDropDown.js. This allows me to to create mulitple cascading related select boxes that are populated via AJAX. This is working fine for me except for when I am trying to reload the original values after a postback. I have the following code in my page; <script type="text/javascript"> $(document).ready(function() { //Attach cascading behavior to the userId select element. $("#userId").CascadingDropDown("#customerId",
looping animation
I'm having an issue with a looping animation, seen here-- http://www.timothycorrigan.com/fastspring_animation/background_test_short.html It works like this-- The 'wave' image, which is symmetrical and exactly twice the width of the content div, is right-aligned with the content div. It's animated so that it moves right until it's left-aligned. By looping this animation you create the illusion of a continuous wave motion. The problem is that it accelerates, decelerates, then pauses with each animation
[jQuery] [feature request] blockUI. To have a cancel button appeared after n seconds if the blockUI not unblocked
Dear sir, From time to time, we might have code which using blockUI that cannot unblock-ed properly. In that case, user can do nothing but refresh the whole page and which is not what we expected at all. I suggest the following options 1. cancel_dealy: which will appear a close button, such as an element within the blockui div and have class ".blockui_close". When click it, unblock will be called. 2. cancelCallback: an call back function if cancel clicked 3. successCallback: an call back function
Not flipping Images For Some Reason, Mouseup not firing
Can someone tell me why this request isn't working? I click the LMB and move my mouse up and down and nothing works (Firebug also gives no errors) [code] $("#filmviewer").mouseup(function(){ alert("t"); }); [/code] html [code] <div id="filmviewer" style="width:400px;"> <img src="pic_1.jpg" /> </div> [/code] The problem is when I click and mouseup over the image the alert("t") does not fire. what am I doing wrong?
Tab Switching with 2 Button States
I hope I'm posting in the right place. I looking to create an image banner rotater with tabs switching the images. On first click of a tab, I'm looking for the function to switch to that tab's associated image. After the image is active, the next time you click on that same tab, it would kick you to some URL within the site. It would function like on the Yahoo! homepage: the tab box with NEWS | WORLD | LOCAL | FINANCE Does anyone know of an existing jQuery function to do this?
calling php same div and another div at the same time
hi, i am new to forum and jquery. and I have a question about jquery. basically when i click on a link in a div i want the change this div and another div, and url. I googled it but i couldnt find a solution. I have to php file, one is bring.php which connect sql and list database order by limit by looking page=id given at url, second php is; paging.php which shows page. if it is same page with page, it shows unclickable with classname "current" other page numbers are clickable with classname "link"
Getting the img alt attribute from within an anchor tag
My brain hurts... I have tried for hours to work this out, but with no success. <a href="IMG_0001.jpg" rel="album" title="IMG_0001"><img src="IMG_0001.jpg" alt="IMG_0001" /></a> <script type="text/javascript"> jQuery.noConflict(); jQuery(document).ready(function() { jQuery("a[rel='album']").lightbox({title: function(){ var img = jQuery(this).attr('title'); return '<a href=download.php?file=' +img+ '.jpg>download ' +img+ '</a>'; }}); });
.animate callback executing twice??
Hi All, First post here and I'd really appreciate some help with an odd phenomenon I'm experiencing with the .animate() function. What I'm trying to do is implement a wicked window scrolling method that I found here: http://www.learningjquery.com/2007/09/animated-scrolling-with-jquery-12 Basically I'm wanting a nested animation, ie do A first then B, so in my example, after the window has scrolled down, I then animate a div to open.. however the callback function code within the // secondary animate
fadeout happens before mouse hovers off element - bubbling?
I have a text item overlaying a picture set to fade in on mouseover and fade out on mouseout. It works fine if I mouse over the top of the picture, but if I mouse over the bottom, where the div containing the text item is (class .popper), the text fades in, but then fades out of its own accord, before I mouse out. How do I stop this? Here's the code. Thanks. .popper {position:absolute;bottom:0;left:0;padding:20px;background-color:lightblue;opacity:.7;filter:alpha(opacity=70);display:none; } <div
IE8 doesn't take effect while replacing a html tag
I have following jquery, which clicking a anchor link to load a content and replace the h1 to h2 tag in the loaded content before replacing a div content on current page $('.previous-news li a').click(function() { var url = $(this).attr('href'); var link = this; $('.attachment-content').fadeOut("slow"); $.get(url, function(data) { var $fullcontent = $('#main-content', data); var html = $fullcontent.html().replace(/h1/g,"h2"); $(link).parents('.view-content').parents('.view-dom-id-2').find('.attachment
How to select (or Traverse to) iFrame parent of a document...
I have an iFrame on a page where I am calling .mouseup(function()) on it's document child. Once in the mouseup function, I need to refer to a specific sibling of the iFrame. Unfortunately, I cannot figure out how to traverse backwards to the iFrame element from $(this) - where $(this) is the document. I get a null set returned when I try $(this).parents(). Any thoughts?
Ajax call cross domain asp.net webservice
Hi everyone, I am recently experiencing a problem with .ajax calling cross domain asp.net webservice. It started working fine, until the data returned from server is becoming too big and suddenly the ajax call caused errors, if i reduce the data length then the error went away. After doing some debug, i have identified the problem being the callback was inserted into the returned data. e.g, in the returned data, i got the following. <div class="download);jsonp1274754505287("><div class="downloadBase"><div
Using jQuery to loop through ASP.NET gridview
Hello, I have a ASP.NET gridview which is rendered as a HTML table. There are 2 columns in the grid. First column is a checkbox and second column is a input textbox in which the user will enter a amount. I want to be able to loop through the rows of the table using jquery to find out the rows that have a checked checkbox and then sum the value in the corresponding textbox in which the user will enter a amount. In other words how do i loop through the table and find out the elements on the same row
Cannot reach parent class
Can someone tell me why I'm not able to remove the class "hasLink" from the parent element that contains the class ".test" <ul> <li class="hasLink"> <div> <a href=" class="link">link</a> </div> </li> <li class="hasLink"> <div> <a href=" class="link">link</a> </div> </li> <li class="hasLink"> <div> <a href=" class="link">link</a> </div> </li> </ul> $(".link").bind("click", function(e){ e.preventDefault();
Datepicker: How to fire an event when a date is selected
I have a jquery datepicker that is working fine. I'm using a calendar icon only to start the datepicker and the result (the chosen date) is shown as text - not as an input field. To get this result to show, the user has to click an 'update' function button first, which in my case has nothing to do with the datepicker itself. I know I can use altField to show the result immediately, but that has drawbacks. So I would like to improve the way it works as follows: when the user picks a date, I
Struggling to create simple image rollovers
Hello, I'm working on a navigation page where some images appear on the left / right of the text when the mouse hovers on a certain container. It's easier to understand if you just read the short code. $("#p1Control").hover(function() { $(".p1right_arrow1").animate({ opacity: 1.00 }, 500); $(".p1left_arrow1").animate({ opacity: 1.00 }, 500); }); $("#p1Icon").hover(function() { $(".p1right_arrow2").animate({ opacity: 1.00 }, 500); $(".p1left_arrow2").animate({ opacity: 1.00 }, 500);
IE7/8 Reporting Missing ) in script
Ok, maybe I am blind. I have a jqGrid onSelectRow operation that is taking specific data within a xml file and putting in a specific div within the DOM. IE and FF are reporting same problem. If I comment out this code, application runs like it should. Where is that missing ")" supposed to go?? $('#slideshow #thumbs').append("<ul class='thumbs noscript'><li><a class='thumb' href='"data.piclocation" title='"data.piccaption"'><img src='"data.picthumb"' alt='"data.pictitle"' /></a><div class='caption'></div></li></ul>");
Please Help: Link Clicked - Text Color Highlight Change
I would like to do this effect on a current project I am working on -- to best explain it -- go to: http://www.gradycampbell.com/ In the bottom right corner, click on "Clients". Now -- when choosing an industry on the left (Consumer, Cultural, etc . . ) -- You'll notice that only clients in those fields are highlighted on the left. Is this something I can accomplish using jQuery? I really need some help with this. Thanks in advance.
Using jQuery from an XSLT throws error; $ is undefined after that
I've been getting a jQuery error when loading jQuery-1.4.1 from XHTML that was generated on the client from an XSL stylesheet. jQuery throws an error on line 825, "cannot set property 'display' of null", where it tries to access the style property of a div that was created using document.createElement. This property is automatically set when calling document.createElement from a XHTML document, but not when calling document.createElement from a XSLT generated XHTML document. Strangely, this works
EDIT: Stop duplication of plugin
I'm using a plugin for a WYSIWYG editor inside of a jQuery UI dialog form and I need to remove it after it gets used so I can re-use it later... There is a function in the plugin code for removing it, but I can't figure out how to call it. Here is the code for the function to remove: * Removes the HtmlBox instance from the DOM and the globalspace */ this.remove = function(){ global_hb[d.id]=undefined; $("#"+d.id+"_wrap").remove(); if ($("#"+d.id+"_about").length
Finding full file path name
Ok, here is what I want to do: Start with a form input type file. Add an onChange behavior which will send the input value item to a javascript. The value item is a file name (a jpg) and the script replaces the src element in the html img code. This actually works fine, except the file name returned as a value is just that. What I need is a full, complete file path and name so the img src can find it anywhere on the computer. I know that PHP can upload the file to the server using the information
scroll to a certain position inside a scrollable div on page reload
i have a div of height 500px and width 800px. i have set it as auto on over flow and usually i have 500 records displayed so it scrolls. lets say i trigger an even on row number 478 inside that scrollable div and that event causes a page reload, can i go back to that same position in side that div? how?
Help with wrapping a div around elements
I'm working with an XML feed that I'm displaying using XSLT. Everything is working great except for 1 thing. One of the nodes that I'm using has a bunch of data in it that I need to split into separate divs for the design. jQuery should work wonderfully for it, but my problem is that in the data I'm supplied there is a string that *should* have a <p></p> around it, but it doesn't. So therefore I have no idea how to select it. Can someone help me out with this? Here is the data that I get: <b>Item
Trouble hiding elements using each()
Can someone tell me why I'm getting an uncaught exception with this? var nav = "navigation"; $link = $("#" + nav + " ul ul"); $.each($link, function() { $(this + " li:eq(2)").hide(); });
Sliding a set of <div> blocks all to the left
Hi All, I've got a bunch of <div> blocks, with a fixed width and height, that are all left floated. I would like a user to be able to click a "remove" link and have it delete a box, and all the boxes to the right "slide in" to fill the void created. I have it working well enough with a "snap" transition. I made that term up because I'm not sure how else to describe it--by "snap" transition I mean that the boxes to the right "snap" into position--there's no "sliding" or easing as they move, it's
How to create dynamic divisions inside Jquery Accordeon
Hi I'm developping an ASP.net web page using JQuery Accordeon . the text inside the Accordeon changes so I'd like to create dynamic divisons that support those changes. Thanks for your help
Find current Table ID in a HTML where we have multiple tables
Hello everyone, Well, I have been using JQuery in the past 6 months and I really got in love with it! Finally, I've come to an issue that (probably) have better solution than the one Im trying to do with. Namely, here is the scenario (shortly). I have multiple tables in a HTML i.e. <table id="myTable1"> <tbody> <tr> <td> ... </td> <td> ... </td> </tr> </tbody> </table> <table id="myTable2"> <tbody> <tr> <td> ... </td> <td> ... </td> </tr> </tbody> </table> ... all of these tables are some kind of
Help with Edit in Place jquery/mysql/php
So I have been trying to figure out "edit in place" from the tutorial provided here: http://docs.jquery.com/Tutorials:Edit_in_Place_with_Ajax I copied the the code and I have the bit where it modifies in place which is cool however I need to be able to save the information modified into a mysql table. Here is my project. I have a mysql table that I present on a php page. Currently users can modify the fields using a standard post. I wanted to update this by using jquery so they dont have to leave
Next Page