Combining IFs - how do I check for multiple conditions?
Since my first question was too difficult, I ask a simpler one How do I check if two or more conditions are met? if (!$(this).is('.class1') && !$(this).is('.class2')) { does not work. Never mind that I can combine the two classes, I need to check for groups of classes so it'd be like if (!$(this).is('.class1,.class2') && !$(this).is('.class3,.class4')) {
Cycle through tr find and add values of each text input?
I know this can be done, but I'm looking for the correct way to do it. Example: <table> <tr id="a"> <td><input type="text" id="t1"></td> <td><input type="text" id="t2"></td> <td><input type="text" id="total"></td> </tr> </table> What I am looking for is: When a value is input (numeric) into the fields (t1 and or t2) they will be totaled in the "total" field. This code is a small example,.. i would have 20 or so fields per table row that would need to be added to a total at the end of each row. Any
[jQuery] Need "QuickLinks" jQuery functionality as seen on NorthPoint.org at top of page
Does anyone know where I can grab jQuery code that will give me the "QuickLinks" functionality as seen on NorthPoint.org at the top of their web pages? When clicked it slides the pages content down to display a links menu. When mousing over the link the boxes resize to display a brief explanation in a box beside it telling the visitor what the link is for. I appreciate any help anyone can give me to find these scripts or point to a tutorial to make it happen. JonDod
[jQuery] Superfish broken by Community Builder
Hi, Superfish works fine all all parts of my site, but in pages which involve Community Builder, the menu no longer works (the menu becomes transparent and disappears as soon as you move your mouse pointer to it). Has anyone else come across this issue, and does anybody (including the author) know of a fix for this? Thanks, Albert
[jQuery] Events : click & blur
Hi All,<div> </div><div>I am trying to add two event on one button</div><div>Events are 'click' & 'blur'</div><div>But when ever I am trying to click on button which is having two event, then first its executing 'blur' event, logically it should execute 'click' event first.</div> <div> </div><div>Is it bug of javascript? Or am I doing something wrong :( </div><div> </div><div>I have tried with JQuery & plain javascript too.</div><div> </div><div>Can any one suggest me what is the solution for the
[jQuery] [Validation] Internationalization support
Does the JQuery Validation plugin supports internationalization? Here in Italy for example we write 1,5 instead of 1.5 and 1.500,5 instead of 1,500.5 and the dates are in another format (dd/MM/yyyy)... Thanks Massimiliano
[jQuery] replace existing div with fadeIn
Hi, I am trying to create a simple menu. Here is what I am trying to accomplish. When you click a link from a <li> list a div fades in on top of the list. When you click another link from the list I want previously faded in div to be replaced by new div. What I have now is all the links fades in randomly. Here is the code I have. $(".rs-salads").click(function(){ $("#salad-panel").fadeIn("slow"); }); $(".rs-soups").click(function(){ $("#soup-panel").fadeIn("slow"); }); How
Can you create $().toggle links for PHP Page Refresh?
Is there a way that anyone has ever seen to make a Toggle reflect an anchor value so that when the page reloads it won't be hidden? This is the code I have.. Yet when I post something from a box, I would like the page to reload with the one that was toggled open set to open. // for:Toggle $(".collabToggle").toggle(function(){ $(this).addClass("collabToggleActive"); }, function () { $(this).removeClass("collabToggleActive"); }); $(".collabDetails").hide(); $(".collabToggle").click(function(){
[jQuery] Event is not triggered when the <tr> removed from one table to another table
Hi I have a query(JQuery) here. can you plz help me in fixing the issue with this code. That is when I click on <tr> of first table that should get removed from first table and added to second table. It is happening fine and good. But when I double click on the <tr> that is added to second table no event is triggered. Why? $("tr").dblclick(function(event){ var row = $(this).html(); $(this).remove(); $("#bottomTable").append("<tr>"+row+"</tr>"); }); do I need to call any method?
[jQuery] index() problem
Seems like this should be straightforward based on the documentation: ... <select id="mySelect"> <option value="0" selected="selected">whatever</option> <option value="1">other whatever</option> </select> ... <script> $(document).ready(function(){ alert($("#mySelect").index($("option[value=1]"))); }); </script> ought to alert "1" - right? Instead I get "-1". If I change "#mySelect" in the <script> block to "*", I get "16", the true index of the option among all the elements of the page.
Create a loop in jquery
Hello. I have several elements that I can perform show hide and fadeIn animations on but I want the action to continue on an endless loop. Is this possible? If it is, are there any cpu usage issues when using a loop? Thanks in advance <script type="text/javascript"> $(document).ready(function(){ $(".upright").hide(300); $(".cntrlg").show(300); $(".cntrlg").hide(300); $(".cntrmed").show(500); $(".cntrmed").hide(300); $(".cntrlg, .lowleftmed").show(100); $(".cntrlg, .lowleftmed").hide(100); $(".lowrightmed").show(300);
[jQuery] :contains selector error/bug in IE
I am loading an XML doc with the jQuery ajax call and then trying to search it using this statement. var myRow = $(myXML).find('Cell:contains(0100)') This works just fine in FireFox and Chrome but I get 0 results in IE Can someone suggest an alternate way to accomplish this same search that works in IE? Thank you, Art Details --------------------------- WinXP IE7 jQuery 1.3.2
Is there an event thrown when the web page loses focus?
I want to stop the flowplayer video player when the page loses focus. Either another tab is being viewed or another app is in focus... I tried (document).blur, ("#pagewrapper").blur, ("#pagewrapper").mouseout... Any suggestions? I have everything working except the page.blur... I can't seem to find an event that will work for this.
Menu Problem
Hello, I'm new to jQuery. I need help with the side navigation on my site here: http://rentapet.org. If you click on Brakes > Brake Pads, you will see that the hyperlinked text in the boxes to the right do not show up. Any ideas why? If I remove the hyperlinks, the text works just fine. Thanks, Andy
slideToggle(show and hide img) problem
I am looking for a way to switch between 2 images in a accordion. JS: $(".toggle").click(function(){ var id = $(this).attr('id'); $("#toggl"+ id).slideToggle("slow"); if ($('.close').is(":hidden")){ $(".close").show(); $(".open").hide(); } else { $(".open").show(); $(".close").hide(); } }); HTML: <div class="box-780-head"> <h3>Box 1</h3> <a href="#" class="toggle"
[jQuery] Calling ASMX from JQuery
Hi, I am trying to call ASMX method from JQuery without success. Following is my code and don't understand what i am missing. Thanks, Ebe ///Something.js function setQuestion() { $.ajax({ type: "POST", data: "{}", dataType: "json", url: "http: //localhost/BoATransformation/Survey.asmx/ GetSurvey", contentType: "application/json; charset=utf-8", success: onSuccess }); } function onSuccess(msg) { $("#questionCxt").append(msg); } ///SomethingElse.cs [WebService(Namespace = "http://tempuri.org/")] [WebServiceBinding(ConformsTo
[jQuery] [validate] can I fool the validator into letting me submit the form?
Hi everyone - I've used and loved the form validation plugin developed by Jörn Zaefferer, and I've run into several cases in which I would like to be able to essentially say, "if these conditions are met, the form's valid, period," without actually checking through valid(), element() or any other means. Is there a method I can call that just forces the validator element to think it's valid, without actually validating the form? Thanks much in advance!
[jQuery] Slide to Unlock - doesn't work with latest jQuery and UI
Why would this script not work with jQuery 1.3.2 and UI 1.7.1? Is it because the slide-to-unlock script is not compatible or because of new limitations of the UI? http://www.marcofolio.net/webdesign/the_iphone_unlock_screen_in_xhtml_css_and_jquery.html
[jQuery] Validate
Hi I like the validate plugin, but it only works with values defined on load, not dynamic values. I'd like to be able to compare field values. For example, if I got 2 fields: #start_value and #end_value and I want to check the end_value is bigger than start_value, should be something like this: $("#myform").validate({ rules: { end_value: { required: true, min: '#start_value' } } });
Question regarding cluetip addon
I dont know if this is a cluetip or a jquery problem, but I am thinking it is the latter. When I access an htm file to popup a window upon rollover of a link, I have to move over and out then back in again before the popup window will appear. My example can be found here: http://www.greenmediahosting.com/test2.htm And the code looks like this: <html> <head > <title>Test Title</title> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js" type="text/javascript"></script> <script
[jQuery] jquery: display external page inside popups (mail goggles)
Hi, I've been through various jQuery windows popups (modal, fancybox,boxy, à la facebook ...) but none of them convinced me. I want to display inside the popup php/html file not images. I really like the modal style but it displays only javascript files. My goal is to have kind of mail goggles popup. The user can't disclose it if he clicks outside of the window. Raymond
Problem with refreshing content
I am creating a travelling website with a Flash gallery on top of it, the gallery has to refresh every time the user navigates to a page (this is necessary because the content in the gallery is different on every page. It may be "wrong" but i couldn't find a proper event to do it so i used the mouse hover event on my body. The thing is that it only loads the gallery one time (because the var overing is set to false). Now I wonder 1. What event can i use to start my gallery on every new page. 2. If
Basic Show/Hide, but only 1 item at a time
Hey guys. I have a table of data, and I would like these options to show up when that <td> is hovered over, but as you can see this hides/shows every <td>. $('div.msgEdit').hover(function() { $('td .msgEdit a').show(); }, function() { $('td .msgEdit a').hide();} ); Is there a way to limit it to the selected <td> at a time? I'm not sure how to go about it, somehow I need a (this td.msgEdit a) in there but I dont know how to go about it
[jQuery] I'll Donate $20USD to Jquery if you can teach me how to do this
Hey Guys/Gals, I have been able to use JQuery in the past, for simple things, and after much hacking around, i have been able to get it to work. I want to embrace this technology, but I can't get past the examples. They're very basic, and I can't wrap my head around how to move them into real world scenarios. I'm a dev, but not a javascript dev. I mean, i know how to do this in Javascript, using xpath and filters, but i really want to use JQuery as the engine, to keep it consistant with the rest
[jQuery] Ajax history/back button - with a twist
Hi folks, I have the classic ajax history/back button problem - with a twist. :-) I'm developing a simple order form using Rails and jQuery. On the top of the page there's a cart and right below it a search form for products. When the user start to type in the search box results are presented on the fly using ajax. When the user clicks on the item he/she wants it's added to the shopping cart with ajax. Now to my problem(s). If the user, after leaving the page, hits the back button he/she is presented
[jQuery] jQuery Workshop - We Want Your Input!
Hi Everyone Apologies for the intrusion, but I'm looking for your input on something. We're looking for input on a jQuery Workshop - let us know what's on your mind! Please fill out our poll at http://spreadsheets.google.com/viewform?formkey=cnN3VWxKcjNOYkZzX1lCNjgwZ29kNVE6MA when you have a moment (poll should take you only 15 seconds to complete). Thank you for your input! Sincerely, Justin Kozuch Founder, Refresh Events w: www.refresh-events.ca e: justin@refresh-events.ca t: twitter.com/RefreshEvents
[jQuery] cycle plugin not working
I am trying to use the cycle plugin but all I get is a static list. I have checked to make sure all my code is matching with the demos online and still I dont get anywhere. I have loaded this code inside the .ready function $('#s1').cycle({ fx: 'fade', speed: 'fast', timeout: 0, next: '#next2', prev: '#prev2' }); This part has been loaded into the body tag obviously. <div id="s1" class="pics"> <img src="/photo_site/pictures/bee.png" alt="1a" height="400" width="600"/> <img src="/photo_site/pictures/Bridge.jpg"
[jQuery] finer positioning of the jquery overlay 1.0.1
I've been trying to figure out how to get the overlay shown here... http://flowplayer.org/tools/demos/overlay/index.html (demo 1 is fine) ...to be positioned relative to the button (0,0) buttons upper left corner and not centered to the browser window. The concept is that there will be a table of multiple rows and a control icon on the far left end of each row - when the user clicks the control icon an overlay box with settings for changing row data will appear on top of the table and aligned to
[jQuery] BlockUI "dialog" unblocking from iFrame
Hi. I downloaded the BlockUI plugin today. I'm having this problem with unblocking from iFrame. I'm making a register page using jquery and ajax, and inform the user if the data given is valid without reloading the page. ok so everything's right, except that after i've blocked the screen after the form is submitted, i cannot unblock it manually (with a button). it works well with the setTimeout -function, but i don't want to try to read 5 lines of text in 2-3 seconds. Nor do i want to make the user
[jQuery] Internet Explorer OMG
I have a function caps = []; /* some array */ function activate() { var index = parseInt(Math.random() * caps.length); if( caps.length > 0) { caps[index].addClass("active"); $("#tip").html(caps[index].html()); } else { win(); } $("a.active").bind("click", function() { var cap = $(this); $(this).fadeOut("fast", function() { cap.replaceWith(""); }); caps.splice(index, 1); activate(); return false; }); return; } it's simple when you click on <A> tag with active class something is happing. The problem
[jQuery] Events - Live -v- Livequery
Hi all, I normally do this with livequery: $('.mylink').livequery(function(event) { $(this).mycustomFunction(); }); So any new .mylink's on a page would also be bound with my custom function. How can I do this with the new LIVE event? or is it even possible? Thanks in advance!
[jQuery] BlockUI "dialog" unblocking from iFrame
Hi. I downloaded the BlockUI plugin today. I'm having this problem with unblocking from iFrame. I'm making a register page using jquery and ajax, and inform the user if the data given is valid without reloading the page. ok so everything's right, except that after i've blocked the screen after the form is submitted, i cannot unblock it manually (with a button). it works well with the setTimeout -function, but i don't want to try to read 5 lines of text in 2-3 seconds. Nor do i want to make the user
Newbie: Adding autorun to content slider
Hello all. I have just started dabbling in jquery, and have added a snippet to a website I am making to rotate content in a div at the top. It simple is a picture and some text with a 'prev' and 'next' button. However, I wish to get rid of these buttons and let it run by itself and continually loop through the content with say a 4 second delay on each one . Is there a really simple way to do this? Here is the code it is calling: var animSpeed = 200; var panelWidth = 750; $(document).ready(function(){
[jQuery] remove() method IE 7 ERROR
Hi, I have an ajax request which is returning an xml, but when I tray to remove an element from the xml response I'm receiving the following error message: This is happening only in IE7 (I didn't tray in IE6) Line: 1283 EROOR: "Object doesn't support this property or method" This is my code: var pDialog = $(data_responce).find('PDialog'); if(pDialog ){ pDialog .remove(); } This is what I find in 1283 when i debugged it : // Compute a unique ID for the element if ( !id ) id = elem[
[jQuery] Cross Port Jquery Library Call
I have created a payment system using Jquery. The problem I run into is when I move from http to https. I get the following error: Error: [Exception... "Access to restricted URI denied" code: "1012" nsresult: "0x805303f4 (NS_ERROR_DOM_BAD_URI)" location: "https:// www.stirthewater.com/scripts/js/jquery-1.3.1.min.js Line: 19"] Source File: https://www.mysite/scripts/js/jquery-1.3.1.min.js Line: 19 I spent roughly 3 hours on Google trying to find a solution to this library cross-port call. It's possible
[jQuery] How to display additional text along with link
I would like to display file extension along with the file links on a web page. For example, I would like to append (pdf) next to any pdf links. The following code works to some extent but not as I intended. $("a[href$='.pdf']").append(" (" + 'pdf' + ") "); If I use the above code, (pdf) is also underlined being part of the link. I want (pdf) next to the link and not as part of the link.
[jQuery] How to animate background images or background of div
I'm putting together a portfolio site and I'd like to use high-res images that take up most of the screen to show different works. There would be a menu bar with links to each work, where a click on that work's link would change the background by doing a standard "dissolve" effect. I have seen many different plugins for "rotating" images and changing background colors at the click of a button. Is there a method specifically for this purpose? As an alternative to altering the background-image of the
[jQuery] $.load() doesn't fires script tags?
Hi Guys, just facing an issue: I'm creating a worklflow for my "app" and found $.load() very usefull. It works except that <script /> tags aren't loaded. I got some jQuery Objects (like Flexbox etc) in my remote pages and would like to have access to this objects after the load() but after load() there are no <script /> tags sadly. Is this a regular behaviour? Or a bug? Regards
[jQuery] Hiding a menu in Superfish
Hi, I want to make a dynamic menu where the items being shown depends on the access of the user. I tried having a code in codebehind of my aspx page that will set a certain li to style display none, but when viewed in IE6 I get a white space within the menu.
[jQuery] .onclick - Executing a function before another - Help Solve
Need the closeAll() function to execute before the div's slidedown. All divs are initially hidden, just making a check that if one is open, it must close before any new div runs. Can someone help point me in the right direction? Here is what I have so far. function closeAll() { $(".div1").slideUp('slow'); $(".div2").slideUp('slow'); $(".div3").slideUp('slow'); } $(document).ready(function() { $(".button1").click(function() { closeAll(); $(".div1").slideDown('slow'); }); $(".button2").click(function()
Next Page