How to append just one time
Hi every, I have this code: $(function(){ $(".dialog_open").click(function(){ $(this).append('<input type="text" name="new_qty" id="new_qty" value="" width="5" />'); }); }); And this HTML markup: <a class="dialog_open" onclick="javascript: return false" href="#">Rebajar</a> When I click "Rebajar" the INPUT appears but any time I click in the INPUT one more appears and then another and another, why? What's wrong here?
XML being truncated
I'm trying to get an XML response from a server using: $('#update-target a').click(function() { $.ajax({ type: "GET", url: "http://player.multicastmedia.com/ws/get_vod_player_info/p_l76910t7/api_7ccba1e8-1592-102b-8824-000c291cbe49/apiv_3.6/l76910t7.xml", dataType: "xml", accepts: "application/xml", success: function(xml) { } }); }); and the XML response is being truncated to about half the full length (looking at the response in the Charles http proxy). If
pulse images on page load
Hi I'm new to jQuery, I can cope by customizing plugins but not writing my own... yet. I have a page with 20 images, and I want say 8 of them to fade in and out when the page loads as these have special links I want people to notice (ideally I'd like them to reduce in size as well as fade in and out - but that may be too much to ask for). With mouseover, I'd like the image to be 100% opacity, on mouseout the image pulses again. I have found all sorts of tutorials with pulse effects on mouseover,
disable & re-enable JCrop. Possible ???
Hi, Am using JCrop for performing image cropping, I came across a scenario where disabling and re-enabling of JCrop is necessary. Is it possible to disable & re-enable JCrop.Please,advice.
Homepage banner to rotate on timer
Hi, I have a feature banner on my homepage which is comprised of a banner image and 4 tab-like buttons. When the user clicks one of the tab buttons the banner image changes. This all works using the code below: $('#promo-items img').not(':first').css({opacity: 0.25}); $('#promo-items li').click(function(){ var itemClicked = $(this).index(); $('#promo-items img').css({opacity: 1}); $('#promo-items img').not($('img',this)).css({opacity: 0.25}); $('#promo-selected a').css({display:
Hover script help. Please
Hello, I am working on a hover script but I don't understand why it is not working.... <script type="text/javascript"> $("#social ul li").hover(function(){ $(this).animate({margin-left:"5px"}, 100); } </script>
jQuery.param
I have next code: var $checkedRecords = $('input[name="checkedRecords"]:checked'); var checkedRecords = $checkedRecords.map(function() { return this.value; }); var data = jQuery.param({ checkedRecords: checkedRecords }); There is error on line 3: uncaught exception: [Exception... "Not enough arguments" nsresult: "0x80570001 (NS_ERROR_XPC_NOT_ENOUGH_ARGS)" location: "JS frame :: http://localhost:62293/Scripts/jquery-1.5.2.js :: anonymous :: line 6846" data: no] Seems like $.param iterate
Issue with scroll loader fade-in in IE8 using jQuery 1.5.1
Hi, I've put together a scroll loader using jQuery and classic ASP which works fine in FF and Chrome on Mac and PC and Safari on the Mac. IE does not work correctly. The scroll loader uses the example at Web Resource Depot (http://www.webresourcesdepot.com/load-content-while-scrolling-with-jquery/) as the basis of the loader. I've added an empty div with a height that allows the user to scroll down a little before retrieving the next set of items using the loader.asp script. Once retrived, I fade
basic each() question
I want to get all element which have the classname 'blaat'. So i tried using 'each()', but for some reason it isn't working... This is the code i have: jQuery.each ( 'li.blaat', function(){ alert('aaa'); }); I only have 2 elements with the classname 'blaat', but it gives me 9 times an alert message... Am i using the function wrong here??
GET ItemValue and Item Name using Index
Hi, I am urgently need a code in this manner var chkIndex = $('#ddlLevel').get(0).selectedIndex - 1; alert('chk: ' + chkIndex); here i got previous index value using current index, now i want to retrieve item value and item name using that previous index value, my code is var chkValue = $('#ddlLevel').val(chkIndex); alert('val: ' + chkValue); but not able to fetch item value and item name // Pass Item Name and Item Value to
Best way to compare two lists with drag, drop and sort.
Hello! So I'm making a tool, which can compare and list items. I'd like to animate them, and make looks cool :) Please help me in fix some issues. issue 1 mouseout event binding Sometimes the overlay panel closes if I pick an item and pull it to list1 - list2 - list1. issue 2 click event binding If I push an element to list1, drop it to the list and click on the another list, the list will comes closer. On clicking back to list1 it animate 3 times instead of one. :P issue 3 placeholders How can i
cross browser select options
hi i have a simple html select control with 4 options. i wish to show / hide these options depending on a condition. ie condition 1 show - select / option1 / option2 condition 2 show - select / option 3 using .show / .hide doesnt work in IE so have got this approach working to remove options depending on the tested condition. $(".dropdown_delivery option[value='1']").remove(); however when i try using append or appendto to put in the options to show it just repeats these every time the event is fired
noConflict working for alert by not css change
Im using the jQuery noConflict method here: http://drupal.org/node/1058168 Now, both of the following work: $jq("document").ready(function(){ alert('alert'); }); $("document").ready(function(){ alert('alert'); }); However this does work: $("document").ready(function(){ $(".view-product-slideshow .pager-num-1 img").css("display","none"); }); But this does not: $jq("document").ready(function(){ $jq(".view-product-slideshow .pager-num-1 img").css("display","none"); }); Ive used the noConflict
Pause "rotating" images on mouse over
Hi, I currently have a loop of images showing up on the bottom of the screen after various intervals, and the only thing left i need to do is to pause this temporarily whilst the mouse is hovering over the current image. Heres the code so far; var InfiniteRotator = { init: function() { // initial fade-in time var initialSlideIn = 1000; // interval between items var itemInterval = 12000; // cross-fade time
form validation messages disappear
Hi guys, I'm learning jquery. I'm trying to display error messages when form validation fails. Currently the error message does show but disappears straight away. I am doing this in wordpress, trying to create my own validation plugin. It does show the error message 'This field cannot be empty' when I click submit but disappears straight away. The below code is in the sks_email_form.php file function jquery_validation(){ //echo 'Inside jquery_validation'; //works //echo plugins_url('/js/validation2.js',
Submenu Image Change while page scrolling down
I have to design a website for my friend and I have no clue how to change the menu image if the page scrolls down, for example If the person clicks on a submenu it will take them to a specific anchor within a page, I have setup a custom jquery scroll bar so all the contents are in the Div that is scrollable. The website is: http://www.cobrie.com/adstest/ If you can see that if you click on the submenu which is 2nd hand and repair and rebuild the content will scroll to specific area, but the clients
$.post() asynchronous return value problem
Hi, I am having problems with my $.post function returning a undefined value. I read somewhere this is because the function returns the value before it gets a result from the server. I am not quite sure how to get around this... function addMediaCategory(name,parent_id) { $.post("addMediaCategory.php",{cat_name:name,parent:parent_id}, function(data) { if(data == "ok") { return "ok"; } else { return "error"; } },"text"); } function callMediaAdd() { var returnVal = addMediaCategory("Cat1",1);
[jQuery] Malsup's Cycle plugin exhibiting strange behavior
I've got an instance of Mike Alsup's Cycle slideshow working on the homepage of a project I'm finishing up, and I'm having different issues with it depending on the browser being used. All of the issues seem to be happening in Mac only browsers. Here's the site I'm having trouble with: http://elixir.biz/coders/marlins/incoming/ The first issue is in FF 3.0.7 on Mac. Occasionally, the first image appears no problem, however the remaining images show up extremely small. I tried setting a fixed width
Putting data onto the POST array
I have been tearing my hair out with this for the past 12 or so hours and am no closer to a solution than when I began. I have a jquery function to dynamically create <li> tags for an unordered list: $(function() { var idealist = $('#idealist'); $('.checklist').click(function(event){ item = ''; $(idealist).empty('li'); $('.selectitem').find(':checkbox').each(function(){ if($(this).is(':checked')){ var caption =
detect an unbound custom event
Hi, I wonder if there is a way to detect a triggered custom event was not handled ? For example, 'myEvent' is triggered by #myDiv: $('#myDiv').trigger('myEvent'); How to execute some default behavior if myEvent is not handled "somewhere in the DOM hierarchy" ? Maybe by binding to myEvent on document or body, and check some event properties (ex: event.result) ? Thanks, Thomas
Can we use a single copy of JQuery on the "top" page in an application with multiple, child IFrames
We have a very large web application that has a top page with multiple, child IFrames living "above" it. We are beginning to use JQuery and wonder if it might be possible to have a single copy of JQuery residing on the top page and reference it from multiple IFrame child pages. The goal is to reduce the memory footprint by avoiding the need for a copy of JQuery in each child IFrame. Thanks in advance. Bob Fitzhugh
href attribute IE vs Standards browsers
I'm having an odd issue that i can't recreate in jsbin. i have an anchor tag: <a class="navigateToCategory" href="#523">Instruments</a> and the code below: $('.navigateToCategory').bind('click',function(e){ e.preventDefault(); alert($(this).attr('href')); }); IE will give me "http://mydomain/index.cfm#523" while all other browsers give me "#523". I tried to recreate this using a small test case, but i can't do it. IE always returns the "#523" just like all the other browsers. here's a
Matching Variables of Two Elements (binding cycle and ui-selectable)
I need help with condensing my script so that a #div_x is related to a separate element img_x. My project uses ui-selectable to grab points on a map and return an image set in a separate div via jquery cycle (as in here http://bit.ly/gH7Lm3). I have bound the 'selectablestop' event to two functions - .hasClass and .append - in order to 1) detect if a point has been selected and 2) append the containing cycle div with a corresponding image (also, incidentally, contained within its own div). As is,
Links not working if a div is after them
I am creating a several step sign up process for our company. I want a new div for each step along the way. I will then either accordian or some other style for them as the customer progresses through the process. I want to use a hierarchy like div#step1 -->content div#step2 -->content etc. I have step1 complete and works great until I put the step2 div after. The links in step1 are not clickable after step2 is added. If I remove the step2 div it works normally. Here is the markup: <div id='hiddenInViewSource'>
Toggle() in Firefox
My website: www.elizabethgin.com For the 'Print' and 'Photography' links, I have submenus appear via jquery with the following code: $(document).ready(function(){ $('#mainMenu ul li:first').click(function() { $('#photoMenu').fadeOut() $('#printMenu').toggle(function() { $(this).animate( {easing: 'easeInCirc', duration: 'slow', } )} ); }) }); $(document).ready(function(){ $('#mainMenu ul li:last').click(function() { $('#printMenu').fadeOut() $('#photoMenu').toggle(function() { $(this).animate( {easing:
Dialog Buttons are vertical why?
Hi, The buttons in my dialogs are vertical. Do you know how to set it so that it is horizontally placed. [ok] [cancel] into [cancel] [ok] I know I can absolute position them. But is there another setting I can change?
Validate ZIP Code for a set list of zip codes
Hey All, I'm completely stumped right now and cannot figure out how to validate an input field for a set group of zip codes. Basically I have a list of about 200 zip codes that are valid for this project I'm working on. I tried using the range method and wasn't able to get it to do what I needed it to do. I don't want anyone else to see what the list of correct zip codes are, this is to verify that they are local. Any thoughts would be great. Thanks.
how to check data with database
i am new to J query , today is my second day. I am working on a code which i need to modify . Code is in ASP.net , J query and back end SQL server . Question is: how i check the value on a text box with database table .
My page is looping forever? JQuery/FireBug
Hi guys HTML codes: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <script language="JavaScript" src="js/default.js></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script> <link rel="stylesheet" href="css/reset.css" /> <link rel="stylesheet"
Regarding scroll state of div
Hi, I would like know, how to remember the scroll state of div. I am using datatables jquery plugin for my table with vertical scrolling. I scroll something and click-on some link, after that if i press back button then the scroll position goto the top. I would like to keep it at the last position. Please help me with this.
Is it possible to clear a done() queue?
Subject pretty much says it all. Let's say you've used deferred.done() to add several functions to a Deferred's queue. One of those functions finds a problem and wants to stop everything else from executing. How can the queue be cleared so none of the remaining functions are called?
jquery post (ajax) works in IE but NOT in FF and Chrome?
Dear All, Please help me on this: I wrote a little program. When the home page loads, I added <body onload="get();"> to retrieve data from database using PHP and then display on the same home page. The codes imported to the home page also include a simple form with Submit button: "<form name='commentform'><textarea row='5' cols='20' autofocus form='commentform'></textarea><br /><input type='submit' id='sub_comment' value='Submit' onClick='addComment()'></form>". When a user clicks Submit button,
Superfish CSS Questions
Here is the Superfish menu I am working on: http://linford.us/common/header.php, (based on the http://users.tpg.com.au/j_birch/plugins/superfish, Examples / nav-bar style). If you hover over Web Solutions / Dropdown Test, You will see that the dropdown CSS is currently screwed up. What I would like the dropdown to look like is this (Hover over Dropdown): http://demo.templatesquare.com/html/hostingsquare There are two issues: 1 - How do I get rid of the pipes on the dropdown without messing with the
Reloading a tab from the inside of the tab..
Hello, first time on the jQuery form but I've been having some trouble with getting the correct code to display what i'd like.. I'm working on a website that has four tabs, [#main, page1.html, page2.html, page3.html] if you click on tab2 it will dynamically load page1.html where there is a form that a user will fill out, and when they submit it, I would like to reload page1.html, or tab2 if its easier and in scope, to show new information. However the only thing I have been able to do is fade out
Show/hide Multiple divs, and remember the has for each???
I'm fairly new to js & jq, I have been working on this for hours now. I have been trying to get this to work, and got it half way. I know it is in my hash tag, but can't find any good help on split/join to remember both. I'll paste my js in a minute. Here's what I am trying to do: 1- I have 2 or more divs that will show one tab, and hide all others (I have been trouble shooting just 2 divs for now). 2- Let's say div #1 has tab 4 of 5 selected, and div #2 has tab 3 of 4 selected. 3- When someone refreshes
Jquery jsonp (firebug)returns missing ; before statement
Here's my code: $( document ).ready( function(){ $('#get_metars').click( function(){ //var icao = $('#icaos').val(); var icao = 'KJFK'; var url = 'http://weather.noaa.gov/pub/data/observations/metar/stations/'+icao+'.TXT'; $.ajax({ type: 'GET', url: url, dataType: 'jsonp', jsonp: 'callback', success: function(data) {
addClass / removeClass Bug?
So here's what Im trying to do: I have a table with over 100 rows, and I am using mouseOver to change the class to 'highlight' the row. I am trying to add some jQuery to make the highlight effect a little more aesthetically pleasing. Here's the logic: on <tr> mouse over change class to 'highlight' on <tr> mouse out change class back to original with a slight fade Here's some samples: Youtube video of the issue Link to working Demo Here's the code: <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
Some problem with the load() function.
I have a "content" div which is used for the .load() function to display some other jsp page. For example, $('#content').load('tag.jsp'); The major function of the tag.jsp is load data from a table. I got a problem in this scenario. In my main page, i have done something such as inserting data to the table. And then run again the script: $('#content').load('tag.jsp'); and expected to view the updated result. However, sometimes i can see the updated result immediately and sometimes after inserting
Form Submit and Ajax call
Hi all, Please let me know whether this works..(ajax call inside form submit) Thanks in Advance.. <html> <head> <script> $(document).ready(function() { $("#form1").submit(function(){ $.ajax({ url:"servlet2", data:({name:"kiran"}), type:"POST", dataType:'xml', success: //any code here }); }); }); </script> </head> <body> <form action="servlet1" name="form1" id="form1"> <input type="text">data</input> <input type="submit">submit</input> </form1> </body> </html>
dynamic div height detection and matching
Hi Folks, Hope you can help me out here. I have 2 divs in a wrapper div. left inner div floated left and the right inner div floated right. The left hand inner div contains a number of suckerfish slide down divs which contain dynamic content and ultimately slide down the height of the left hand div when one of them are expanded. My problem is that I want the right inner column [ which just contains text ] to change height to match the left div when the dynamic content in the left div is clicked on
Next Page