Increment ID of selected cloned elements by one
Hi i have following code: <input type="button" name="addNew" id="addNew" value="Add New Activity" /> <table border="1" class="likertBorder" cellpadding="2" id="actTbl" > <tr class="likertBorder responseRow" id="actRow"> <td class="likertBorder" valign="middle" align="center"> <select id="SPORT1" name="SPORT1" onchange="display_sports_followup();" onblur="display_sports_followup();"> <option value="">-- Select Activity --</option>
slide then fade in
hi, I am fairly new to jquery and I have to build an animation where I have 5 different divs, which on rollover slidedown and display some text that fades in. On rollout, the text fades out and the div slides up. This way only one div could open at a time. Any help would be greatly appreciated thanks
Different behaviour since v1.4.4
Hi, In a very simple JQuery example I use the following code: $('#master_sidebarNews').toggle('slow'); If using JQuery up to v1.4.3 this works just fine. When switching to v1.4.4 I get an "Object expected" JScript error on this code. Can anybody help? Thanx
animate() effects stacking up. Any way to disable this?
Hi, I am trying to make a piece of text glow green then back to black every time a user clicks a button. My code looks like this: $('#div1').animate({ color: "green" }, 100, function() { $('#div1').animate({color: 'black'}, 100); }); This works well. However, when i click the button so fast so many times in a row, the animation lags behind, because jQuery is trying to finish each animation to the end before going forward. Is there any way to disable this? Like, put something
unexpected behavior
hi guys, i've made a simple tab switcher in my site, it work's like it has to; the issue is that when you scroll the page, and than try to change the visible tab, the page moves for (to me) no reason! if you want to take a look just click: http://800.omnigrafica.it here's the javascript: $(document).ready(function () { $('#zona1 .sez.active').fadeIn(0); $('#schede li span.centro').click(function(){ var sezione = $(this).attr('id') if ($(this).is ('.active')) { donothing } else{ $('#schede li span.active').removeClass('active').parent().removeClass('active');
$("tr#r26").addclass is not a function error
using this script: <script src="http://code.jquery.com/jquery-latest.min.js"></script> <script type="text/javascript"> function Antwoord(id,vraagnummer,antwoord) { alert("Je klikte op id = "+id+" van vraagnummer " + vraagnummer + " antwoord " +antwoord); } function GreyOutRows() { /* '.$jquery.' */ $("tr#r26").addclass("hidden"); } $(document).ready(function () { GreyOutRows(); });
read event of ifreame
Hi all. i have a problem, hope someone can help :) i have an i freame: <frame src="masluliotSahirSahar.jsp" id="mainFrame" name="formIFrame" width="720" height="380" frameborder="no" scrolling="no" > i have some menue that load in that iframe diferent content (from my domain): something like: onclick document.all.mainFrame.src = newSrc i want to use simple jquery script on the page loaded in the ifreame but .ready() event didnt work... what can i do ? thanks
IE8 compatibility view
Hi all, While doing a front-end javacript performance test on a site I'm developing, I'm finding on IE8 standards mode everything runs ridiculously slow. But if I flip compatibility view on, it runs very well - the animations are much smoother. Unfortunately I cannot upload a link to show, but one of the plugins I'm using is a magnifier: http://www.huydinh.co.uk/demo/magnifier/ Toggle between compatibility mode, and move cursor around. I also tried adding the EmulateIE7 meta tag, but it made no difference.
hover div problem
hi , please help me with this I have series of div with same id name , as this is database result set display . The font color inside the box should change with a back ground color . I tried using jquery hover , swapping css and even .find() methods but resulting in changing the font colors for rest of the div's too . Your help is appreciated , ----------------------------------------------------------------------------- <div id="box"> <span class="text1">text1- box1</span> <span class="text1">text1-
how we can pass arguments to Jquery functions
how we can pass arguments to Jquery functions... I hav this code:<td><a href="#" id="prepare" style="font-size: 11px; width:70%; height:20px" >Prepare</a></td> $('#prepare') .button() .click(function() { // clientData="?perform=viewSiteDataDetails&searchingRefNo="+referenceNo; addTab(); }); I want to pass a value to the jquery Function prepare....
Call fires when clicking on inline elements. Please help
hey guys.. got a bit of an issue, gonna try explain best i can.. here goes. i have a FAQ Question h2 acting as a trigger to slide out a hidden div below it, the FAQ answer, and clicking it toggles the h2 class so the bg img changes. toggle_container is the hidden div, h2 is the trigger.. code below: $(document).ready(function(){ $(".toggle_container").hide(); // Hides the container onLoad $("h2.trigger").click(function(){ $(this).toggleClass("active").next().slideToggle("fast"); }); }); now i have
Links I Insert Dynamically Don't Work.
It's a little tricky for me to explain this because there's a lot of dynamic code involved. Here's my jQ code to start: // Closed Yes $("#closed_yes").click(function() { $("#tag_options_box").load("../../user/tag_options_insert.php?action=yes&id="+rid,function() { }); }); // Closed No $("#closed_no").click(function() { $("#tag_options_box").load("../../user/tag_options_insert.php?action=no&id="+rid,function() { }); }); // Closed Tag $("#closed_tag").click(function() { $("#tag_options_box").load("../../user/tag_options_insert.php?id="+rid,function()
Two Divs, one button alternately fade in and fade out.
I have Two divs which is #webcont and #postcont while my button is .ensite. when the page loaded the postcont will be visible while webcont will hide.. when I click ensite, webcont will appear and postcont will disappear. when I click it again post cont will appear and webcont will disappear. its just going alternately. I'm confused about this and can't create a proper code. please help me! i can't find any questions like this on search.
OnKeyPress - Search divs in webpage and toggle visibility
Hi, Trying to make a live search, a user can type the string he's looking for and in realtime the results (divs where the searched text is found) are being filtered and toggled to be visible or false. So any ideas how to realize this? Searched the internet for more information but didn't found anything. I'm not good with JS so any help is great
Adding a class to body tag upon validated form submission
Hi gang, I'm working on a little project where they have a slider form and I need to piggyback a tiny line of code into the validation function for the form. What I need to happen is when the user has filled in all the fields and clicks the submit button AND the data validates THEN a class is added to the body tag. My jQuery knowledge is very minimal - I added the code to where I 'thought' its supposed to go but it didnt seem to work. Can someone please point me in the right direction? jQuery(document).ready(function()
string match inside a var ? How to
Hi, i currently have a problem which i cant resolve and i cant seem to find a solution (i actually not sure what to look for). My jquery level is medium-low and im trying to take it to a higher level right now. I have a var which holds a href value. However i only need part of the string. var fileurl would be for example : http://somewebsite.com/admin.php?page=browsing&action=download&selfile=/home/website/file.jpg&_code=9999999999 I know this structure in the href wont change. So i need to remove
onclick event for dynamic buttons
I have a page where I want to display buttons only when a particular list item is selected. The user can then click on one of five buttons. I am able to put the buttons in a <div> section using this $("li.point").click(function(){ choice = $(this).attr('id'); Competition = $(this).attr('title'); Title = 'Color Prints Regular'; var btns = '<button class="eoy" id="CR" title="Color Prints Regular" type="button">Color Prints R</button>'; btns= btns + '<button class="eoy"
load() within ajaxStop() not resolving
Hello, I have a script wich processes a bunch of image files and then zips them up into several categorized zip files. The zip script needs to run after all the processing of the images. Here's how I have it set up: $('#zips').ajaxStop(function() { $(this).html('<p>Preparing zip files</p>'); $(this).load('make_zip.php'); });The make_zip.php file is executing (I can watch on my FTP as the zip files are created) but the load function never changes the contents of #zips to be the output of make_zip.php
Loading external content into div
I'm trying to load content from an external html file into a div. Here is the code I'm using now: <script type="text/javascript"> ("#upcomingevents").load("upcomingevents.html", function(){ //function executed when load is done. }); </script> However, when the page loads, none of the content is loaded. Any help would be greatly appreciated! Matt
Add <tr> dynamically
Hi, I have following code. I want to have a button at top so when it is clicked a new row added under current containing all contents but ID's for row, select and text boxes should increment by 1. Here are two jquery scripts - dynamic select box and clone row. Each of them work fine but I cannot find the way to use it together in one script. or if someone suggest another short code for that. Thank you for any suggestion! <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Radio Button
I am trying to make an if statement that says, if this radio button is clicked.... Then set this radio and another radio to checked. Please help. if( $('input[name=selector]').click(function() { $('input[name=selector]').attr('checked', 'checked') }); { $('input[name=ph]').attr('checked', 'checked'); }
Does anyone meet a "always click" problem or bug?
In my website ,I found that drag or sortable effect can't be achieved.When I drag the element from the original position,and click, put it in another placeholder,it still stick with the mouse cursor,the element goes where the cursor goes.The $(document).click() can't be achieved,too.When I just move the mouse on the page,the click event happened So I come here for help,does anyone have meet the problem before?or anyone can tell me the way to solve this problem?thank you
Jquery .click not working as planned
$(function() { $("#ForButton").click(function() { console.log("frak me"); $("#ButtonDiv").html("<div id='message'>Sup ninja face</div>"); $("#message").html("Ninja faces are pretty epic").append("<p></p>").hide().fadeIn(1500, function() { $('#message').append(); }); }); }); The goal, is to make a button in a form change into the text above. it is not working, instead you see "frak me" really quick int he console and then the page reloads. Any thoughts? Thanks,
Is there some type of script or plugin that can show the x,y coordinates of a draggable div?
Is there some type of plugin available that can dynamically track and output x,y coordinates of a box I set using .draggable(). I'd like the coordinates to show inside the box as it is being dragged. Check out this practice site: http://pourite.com/resizable/resizable.htm I wrote I simple scripts and I'd like to be able to drag any box I add and show the x,y coordinates inside of each one. Thanks
Help - using JSON cross-domain`
$(document).ready(function () { Help! When I do this it works, but when I uncomment the https line, the browser has an error in Jquery complaining about a variable named "q". Any idea? $.getJSON( // 'https://www.webclientportal.com/cirwin/LoginInfo.aspx?&callback=?', 'LoginInfo.aspx', function (data) { alert(data.Test); }); });
Problems including php within same directory
Hi there I've got some problems with including a file that is in the same directory as my "function.js" file. I have the following structure: / with index.php including /include/functions.js Now I want to include within this function.js a function.php: $.get('/include/functions.php', { getAction: 'get_metadata', getPageHash: hash }, ....That just won't work. If I include it from / it works: $.get('/functions.php', { getAction: 'get_metadata', getPageHash: hash }, ...I really can't see through this.
Managing events
Is there any way in jQuery to move the order of events on a dom element. I have an element (the add button on a jQGrid display) that I want to place a click event in front of the one one put in by jQGrid. I had a look at the jquery.eventmanager plugin but that doesn't really allow the kind of manipulation I want. I also found it didn't like handling the click event anyway. I'm thinking something along the lines of; var saved = $(ele).getEvent('click'); //this function doesn't exist yet $(ele).unbind('click').bind('click.new',my_new_func).bind('click.old',saved);
Binding events to the object's prototype
Hi there, I've just discovered something quite interesting: has it occurred to anyone that it's possible to bind events to the object's prototype and that you can fire those events from an instance method with the object as a target ?... have a look at this snippet: /* @Class */ var MyClass = function () {...} /* @Members */ MyClass.prototype.methodThatTriggersAnEvent = function () { // some code here $(this).trigger( 'myevent', [...] ); } /* @Events */ $(MyClass.prototype).bind({
JConfirm Issue
Hi i am facing a problem after using jquery jconfirm alert. Issue is that after receiving confirm alert, when user press tab to go on Cancel button and press Enter key there, despite of firing event of Cancel button, it fires the event of OK button. this issue is not produced when user press the cancel button by mouse. Waiting for your replies. Regards Kazim
Having an issue with Jquerry CSS
I have a project in which I have an image that has a lot of locations. I had to use an image map in order to show a specific tooltip for each location. I have successfully added the tooltip and for the most part stylized it the way I like. The issue is that there is a border around the BG image of the tooltip. border:'none', works great in Chrome and Firefox but does not work in IE...I can't seem to get rid of this border...please help. Below is my code. (I highlighted the most important part in
Problem with ajax parsing
Hello, Im currently running a jQuery script that is giving me a parsing problem. Ive worked on this for two days. Im missing something, does anyone see anything wrong with this. What am I doing wrong. { nanda:[ {"id":"1", "nacust":"AAA001", "naname":"AAAA WORLD IMPORT EXPORT", "naadr1":"7800 NW 29TH STREET", "naadr2":"", "nacity":"MIAMI" , "nastat":"FL" , "nazip":"33122"}, {"id":"2", "nacust":"AAL001", "naname":"AEROBRASIL AGENCIAMENTO E LOGI", "naadr1":"LTDA RUA BELO HORIZONTE 93", "naadr2":"CNPJ:
Stuck on figuring out how to change multiple elements onclick
I'm working on some jQuery and have gotten a bit stuck. I'm quite the newbie with jQuery but loving it! I'm attempting to change 2 elements on a page onclick. I can change one, but haven't figured out how to change multiple elements. Here's my code with comments afterwards: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"
Sliding menu glitch
I am new to using Jquery so please forgive me if I have some glaring problems. I am using a sliding menu, however I was having spacing issues between the DT elements and the LI elements (thumbnails) between different browsers. The only way I could get them to be the same, and how I wanted it was a work around by adding a top-margin to each UL which fixed it, but now the animation is glitchy. It snaps up after it slides. Any help is appreciated, thanks! http://robpizzolato.com/jason (stay on the
submit if check passes
I'm probably not writing this the proper way, but I have code that almost works. $("#submit_button").click(function(){ $(".product").each(function(){ if ($(this).val() == '' ) { $("#product_failed").css("display", "inline"); $("#myForm").submit(function(){ return false; });//end submit false }else{ $("#product_failed").css("display", "none"); $("#myForm").submit(); };//end if });//end .product each function });//end submit button click The error message shows and hides properly based on whether
jquery, querystrings, and displaying chunks of javascript code
Hi, I have to come up with a hack for a client where displaying chunks of Google tracking code depends on the presence of a specific value in a querystring. I found a simple jQuery function to grab the querystring value. The problem/question I have is how to display a chunk of Google tracking code based on the presence of a specific value. For example, in PHP, you can use %> to switch to output of static HTML and then use <% to switch back to PHP and that, in turns avoids having to escape code, especially
Data on JQuery selector performance?
I'm hunting for information on the performance of _current_ jquery selectors on _current_ browsers. All the information I've been able to find is several years old, so I don't trust it. Has anyone done/posted recent testing results? thanks
Problem with Events
Hi there, I'm new to jQuery but I can't seem to find an example for what I'm doing. At least any examples I've found don't have this problem. On a click event of a jqGrid row I'm loading two <ul> lists with Ajax. I'm trying to bind click events to each <li> so they call a function that will put them in the other list. It's your basic "Assigned Values/Available Values" paradigm. Values are states assigned to vendors in this example. It works but when the click events are bound to the <li> elements,
avoiding object has no method errors
Hi All, I am trying to use some really simple jquery in a rails 3 app. I am trying to get a function to run whenever a rails 3 js callback is fired, the function is to add or remove css classes from link elements. But so far I keep getting errors in the console (chrome) stating that the object defined by my css selectors doesn't have the addClass and removeClass methods. Here is my code: $(function($) { var resetArtistTabStates = function () { $("#artist-tabs li a".addClass("current")); alert("something
Selector problem with ajax xml document - script and links included
I love jquery! I have been using Flex for this stuff but am migrating my stuff but i hit a snag and what to share with the community. Problem: I have a large xml file that reads in great with the ajax get - xml but I have tried to use selectors like gt(20):lt(200) to limit the number of products exposed to allow quicker loading as there are 400 plus products. I can get the selector to work on sample files but cannot it limit the number of products. any suggestions are welcome. The idea is to have
jQuery is undefined only in IE7 and IE6
I'm running into a weird problem with jQuery (currently 1.4.3) and am turning to the community for help. When using Chrome, Firefox, and IE 8, jQuery loads fine for me (as it always has). jQuery loads after it, as do all our plugins. Page functionality is as expected. When I open open Web Developer in IE 8, switch the Browser mode to IE 7, all heck breaks loose. Well, maybe not quite that bad but... When the page reloads, I get a whole slew of 'jQuery is undefined' errors and the page stops loading.
Next Page