combining jquery - how to load() an html page which itself contains the cycle plugin
i want to load an html page into a div and this page has an implementation of the cycle plugin. I should say that cycle is working fine on this separate page it's just that when i load it into the div, it fails. I have tried brining the jquery code into the top level page as well, but that didnt seem to work. any advice? thanks!
jQuery Tool evaluation
Hi guys, Yesterday Zend Technologies, the PHP company, released Zend Studio 8 Beta which supports jQuery source editing and debugging. Zend Studio 8 will also bring an integrated browser into the IDE. We are looking for jQuery developers who want to evaluate the new tools (currently in beta stage) and provide valuable feedback. http://forums.zend.com/viewtopic.php?f=79&t=7248 Disclaimer: this is a commercial product with 60 days trail, so if you are not interested please don't be surprised :) Thanks
Find multiple object types?
Can I find multiple objects in one call? For example, I have ahold of a TD object that has in it input and select objects. I want to addClass to both the input and select objects therein? Something like ".find('input || select')"? Otherwise I guess I could just do multiple calls similar to: //First find all of the required elements indicated by the red * $("span[class=redEmphasis]").each( function() { //Then get ahold of the next object (td) and find all the input //fields therein (only for
condensing / simplifying multiple operations
Hello jQuery community - I have the following code, which works great, but i'm looking for any suggestions that could help condense / simplify this code, considering it's essentially doing the same thing, in exception to the different input element + it's associated value. For clarity's sake, i've highlighted the differentiators in red. //CLEAR / RESET PRE-DEFINED FORM FIELD VALUES $("div#name input").focus(function() { if ($(this).val() == "Your name") { $(this).val('');
Dragable div - How to fade in on page load
Hi all, Is there a way to get my dragable div's to fade in on page load, the code i'm using to make them drabable is below: <script type="text/javascript"> $(document).ready(function(){ $("#draggableSitUP1").draggable({ opacity: 0.7, grid: [20,20] }); $("#draggableSitUP2").draggable({ opacity: 0.7, grid: [20,20] }); $("#draggableSitUP3").draggable({ opacity: 0.7, grid: [20,20] }); $("#draggableSitUP4").draggable({ opacity: 0.7, grid: [20,20] }); $("#draggableSitUP5").draggable({
jQuery AJAX and PHP variables
Hey guys, I have a quick question. I am using jQuery AJAX to login and logout. When the user is logged in, I want to show the user's username, which I store in a session. So, $_SESSION['username'] is equal to a given username. I am pretty new to jQuery, so so far, I have only displayed information that I have echoed out in a PHP script. Is it possible to somehow pass other information back to jQuery from the PHP script. Say I have a login.php and somepage.php. Somepage.php has the login form and
Can jQuery be used inside a Dreamweaver extension?
Hi. This is a tough nut to crack: Is it possible to use jQuery in a Dreamweaver extension? These extensions use the following syntax to reference the extension and the actual document which the extension will modify: document.forms[0].elements[1] // refers to the extension file's form element var dom = dw.getDocumentDOM(); // gets the DOM of the current document var firstImg = dom.images[0]; firstImg.src = "myImages.gif"; You can have SCRIPT library tags in an extension file (which is a *.htm
toggle, hide show 2 divs with one button
Hi, I have a probelm with solving this issue. I have 2 divs: <div id="box1></div> and <div id="box2></div> I also have one link to contoll them both. The effect I want to get is: when I click first time on my link box2 hides, when i click second time also box1 hides, when I click third time both divs should show. I manage to do that both divs hiding but later I can't get the show. Im trying sth like this: $(document).ready(function() { $('.slick-hide').click(function() {
Changing two items with the self id
Hi I'm all new to jQuery and have the following problem. I'm sure the pros here can give me a hint, how i do it the right way: <div class="images"> <img id="id-14" src="Jack" /> <img id="id-22" src="Dan" /> <img id="id-15" src="Paul" /> </div> <div class="names"> <div id="id-22">Dan Pundler</div> <div id="id-14">Jack Mc Donalds</div> <div id="id-15">Paul Jackson</div> </div>The images are fadedTo .5 after loading. The mouseover on the names have to fade the pics
2nd run effects
Hi There, I have this in my head section: <script type="text/javascript"> $(function() { setTimeout(function() { $(".msg").hide('puff','',500,''); }, 4000); }); </script> If I do an asynconous post the effect runs as desired the first time, if I then run the post subsequently the effect does not run as desired. Even if I include the effect js snippet in my return response it does not work. Is there any method to reset once it runs so that it can happen on subsequent posts? It
Attr() function not working in IE7, alternatives?
Hello Is there any alternative way to disable elements in real time as .attr("disabled",true) or .attr("disabled","disabled") do not work in IE7, only with IE8 or FireFox 3? Thank you.
.append() Iframe IE Problem
Hi Perhaps this is a bug, but I cannot access an outer document from an iframe with jquery. here a very simple example: top document: <html> <head> </head> <body> <iframe src="test2.html" id="UserIFrame" name="UserIFrame"> </body> </html>and child iframe: <html> <head> <script type="text/javascript" src="styles/genevadesign_jquery-1.4.1.js"></script> <script type="text/javascript"> function doit(){ $('body',top.document).append($('#progressBG')); $('body',top.document).append($('#progress'));
Searching variables for an ID
Hey, I hope I won't get banned for spamming these forums with questions, but here we go... I am trying to search an AJAX response for an ID, but it is not working as intended. // Some code omitted success: function(result) { $('#load').fadeOut(250, function() { // Fading out my loading gif $(this).remove(); // Removing it // With the if sentence below, I want to check if the result contains a form with the ID of "memberForm", but the sentence always evaluates
JQuery not working in asp.net update panel
Hi All New to website and using jquery, i have a problem where i cannot get my code to work in an update panel, when i click the button, the paragraph appears using jquery, but the delay and fadeout does not work. Can any one show a novice some code on how to get this to work. Regards George
jquery does not work in IIS
Help! I have jquery code in a default aspx page. I have tested and it works in Visual Studio Environment. I deploy the web application to the IIS. When I try to browse the aspx page, it rendered the page, but none of the jquery code runs. This is urgent. Thank you
Why dosen't my .append() and .fadeIn() wanna work together..?
Hey dudes and dudettes! First, here's the code I'm trying to get through: JavaScript Code: function addSponsors(s) { var sn = prompt("New sponsors name?"); if(sn !=null) { jQuery.post('../wp-content/plugins/NewLife-EventCalendar/php/addSponsor.php',{sponsorName: sn}, function(r) { if(r) { jQuery('#sponsorList').append(' <tr id="row' + r + '"> <td class="id">' + r + '</td> <td class="name">' + sn +
$('input').map(function () { return ($this).val() }).join is not a function?
http://www.sfu.ca/~jdbates/tmp/jquery/201007270/ Why does this example ^ complain that .join() isn't a function, instead of displaying an alert, "foobar"? Here's the script, jQuery(function ($) { alert($('input').map(function () { return $(this).val(); }).join('')); });
jquery ajax does not work in Firefox
Help! I am using jquery ajax to retrieve data from an asp.net web service. It works ok in IE8; but when I tried it on Firefox (3.6 or so), it generated an error: parsererror So much for cross-platform transparency. Here is server code snipet: JavaScriptSerializer js = new JavaScriptSerializer(); string strJSON = js.Serialize(rows); return strJSON; Here is the jquery code: function CallService() { $.ajax({ type: "POST", url:
insert an image container before text in a li element.
I'm trying to bend my mind to insert a <div class="image_container"/> before the text in an list element <li>text1</li> <li>text2</li> <li>text3</li> should become: <li><div class="image_container"></div>text1</li> <li><div class="image_container"></div>text2</li> <li><div class="image_container"></div>text3</li> I'm quite sure it's very simple but I'm struggling now for a few hours without result. $('li', this).before('<div class="image_container"></div>') makes <div class="image_container"></div><li>text1</li>
Animate div's - toggle
Hi, Please see http://bit.ly/cQp94a above local map, on the left hand sidebar, i have a button, click it and the pano div extends to 100% and the sidebar moves -300px to the left, click it again and they move back, but click it again and the sidebar continues to more 300px to the right and the pano div does not go back to 100%. I am newish to jquery and would be really grateful if someone could help me with the following code, to create a toggle that moves the divs then puts it back. <script>
.animate() - callback function executing before animation is complete
Hi all - I'm fairly new to jQuery and this is my first post on this forum, so I apologize in advance if this turns out to be a dumb question. Here is my problem: I have a slogan that is supposed be animated so that one part slides onto the screen, followed by the other part. My understanding of the 'callback function' parameter on the .animate() function is that it's not supposed to execute until the animation is finished. The trouble is, the two functions seem to be executing at the same time
How can i replace all instances of the string?
Hi, i have phone number on the page. Let's say 0208 123 45678 and i want to replace it with 0207 123 9999. Thing is, phone number is not in one type of tag, id or class. All i can tell you, it is somewhere throughout the body tag. Any help welcome. Pete
help needed with menu using jquery
<!DOCTYPE html> <html> <head> <style> p { background:#dad; font-weight:bold; font-size:16px; } .mn_offLeft { display:none; } </style> <script src="http://code.jquery.com/jquery-latest.min.js"></script> <script type="text/javascript"> jQuery(document).ready(function($){ $(".a1 a").click(function () { $("#c1").show(); $("#c2").hide(); $("#c3").hide(); }); $(".a2 a").click(function () { $("#c2").show(); $("#c1").hide(); $("#c3").hide(); }); $(".a3 a").click(function
New Element around the first Letter of a String
Hi, How can I create a new element around the first Letter of a dynamical outputted string? I need this because I want the first letter in another color. Now: <span class="boxTitle">Login</span> Target: <span class="boxTitle"><span class="firstLetter">L</span>ogin</span> I am a jQuery noob, so which functions have I to use to reach the written target? Thanks for helping, Redfish
swapping divs with .after()
Hey guys, I want to swap two <div>s and decided to use the .after() method to swap them. My problem is, that the first div contains javascript, what cause an error. When I use two different divs with only html it works easily, but not with the script-contained-div. I'm sorry for my bad English, I think I can't explain my problem very good, so I attached 2 images which could explain my problem a bit furhter. Also here is a link to a testsite I set up, where you can find the source I used. -> Testsite
Paid request: jQuery Subcategories sliding down out of main category
Hey guys, I was hoping if someone could do this for me, basically I'd like to have a parentcategory. For example this one: ''Remixes'' And when you click on it a couple subcategories slide down from under it. Like this ''Remixes'' - Acapellas - Instrumentals - Requests I'm willing to pay anyone who can write this for me, shouldn't be to hard right? Here's my site btw; http://amerikasmostwanted.com/vanillaforums-Garden-8832d74/discussions It would also be nice if the parentcategories had like a small
Sortable not working with hidden div's
I also have a draggable list in the page. When the page loads, the div containing the sortable is hidden through display: none and the draggable is disabled. When the user clicks the link to show the sortable div, it displays using the show() function and the draggable is enabled. All this works as expected. If the user then tries to move an element from the draggable list into the sortable list, nothing happens. The draggable works as expected, but the sortable refuses to accept any items. But if
Combined selector
Is there a way to combine selectors with && condition. eg: $('.classname div[att=value]') Requirement is to select all div elements with class 'classname' and (&&) an attribute 'att' whose value is 'value'
Equalheights not working in JQuery 1.4. but working fine in 1.3.2
Hi, below code is working fine in jquery1.3.2 but not working in jquery1.4. it is giving following error Error: a.ownerDocument is null Source file - file:///C:/....../jquery-1.4.2.js Line: 117 Please suggest a work around. Note: Download the latest jquery 1.4.2 to preview. The below code will work only in Firefox CODE - <!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" xml:lang="en"
iterating over nested JSON object..
I have created a JSON object through a PHP script. The code is as follows: $result1 = array(); $i = 0; while($row = $result->fetch_assoc()) // $result contains result from a database query { $fuser = $row['uname']; $fid = $row['uid']; $name = getName($fuser); $temp = array("name" => $name, "uname" => $fuser); $result1[$i] = json_encode($temp); $i = $i+1; } return json_encode($result1); I want to get each json object (represented by $temp) and then value of "name" and "uname" fields for each such
Get full a href by link source
How to get full <a href if I have only link for example http://www.mysite.com/image.jpg ? I have this link in variable "_src".
dialog form fails on 2nd submission
Hi There, I have a series of dialog forms that are launched from a table, The code below allows me to launch and submit each form successfully to edit administrator accounts. However, if I edit an administrator, submit and then try and edit the same administrator again it fails on the 2nd run. Is it caching the response? $(function() { var $loading = $('<img src="<?php echo "" . SS_ADMINURL . "";?>images/widgets/loading.gif" alt="loading" class="loading">'); $('#admins td a.edit').each(function()
Fetching values from onSuccess funtion.
Hi, I am usign $.post() method to post selected value in a drop down to server. On server-side I fetch resultset based on the selected value, and serialize the result set via the Response object which is fetched by the on Success function within $.post. How can set the textbox values conatined within that result set to those textboxes? Rather how can I fetch each of the values out from that response object in JQuery? Please help!
how to trigger all accordion elements up to top?
Hello, I faced problem. I`m quite new with jquery and I keep thinking how to trigger all nodes from current node up in the accordion? I used accordion as product tree, so I need to trigger specific node and app it`s parent to make it visible. Any smart ideas? :)
jQuery.load and PHP's Header() redirect.
Hello All,I came across the problem of headers when porting an application to jQuery. The header call gives an error and halts the process due to headers already sent error, and after a while of Google searching I didn't really come up with much but a few people asking the question with no real answers. (at least none that suited me) So, how do you handle a load that your PHP may try to redirect with a header call?? Well, here is what I did...I duplicated the standard load function and created
slideUp looks to execute twice in IE
I have written code for an accordion tab for practice and it works great except for one thing (which only happens in Internet Explorer): when I close one of the tabs, the information will slide up like it should, but then when it hits the top, it opens and closes again very quickly. This does not happen in Firefox (and in fact doesn't happen if I close the tab that starts open). The js code I have is: $('#accordion h2').click(function() // This is the accordion code. { if ($(this).hasClass('current'))
How to combat cross-domain POST Problems using jQuery
Hey guys! I thought I'd post a link to an article I wrote about how I overcame the grand old problem of POSTing cross-domain using jQuery (or any javascript lib, for that matter). Take a look here and tell me what you think :) http://www.johnhamelink.com/2010/07/combat-crossdomain-post-problems-ajax/
.click() and .submit() functions do not work on HTML Elements inserted after page has loaded
Hi, I have a page that inserts a div after another div on my page. Basically this div and its content are generated by the server and outputted via Ajax when the user clicks a button. I have something like: //Listener function $("div").click( function () { alert("thing"); });Clicking any of the divs that were loaded on the page will give this alert however, clicking on this div that was inserted after the user clicks a button does not respond to this listener. I put my rendered html into the w3c
jquery .post and .ajax always executing javascript
Hi, I seem to recall some documentation on this feature but now cannot find it to save my life. I am fetching some HTML which contains some JAVASCRIPT tags using jquery ajax features. If I receive the data back and then in the success function use .append to place it in the page the javascript effectively executes twice. Once as the retrieval happens and a second time as the .append is called (the second time in the context of the page). I don't want this first execution, I only want the javascript
document.referrer for a splash effect
Hi, I'm trying to create a splash page effect on my index page by adding some full screen images with jquery. I got that to work, but I only want to call the script if a person is arriving at the homepage after coming from an external site. I think I can use document.referrer in something like this: <script type="text/javascript"> $(document).ready(function() { var url = document.referrer; var match = url.indexOf("sitename"); if (match != -1) {
Next Page