[jQuery] How Streetread Was Developed (jQuery + Drupal)
Get a close look behind the scenes of Streetread's development. Learn great tricks and techniques that power the site. Streetread is a new financial news aggregator powered by Drupal and jQuery. Please direct all comments and questions to the post itself.
[jQuery] scrollTo plugin doesn't work
Hi all I'm playing with scrollTo plugin and nothing works. Please look this simple code: success: function(data) { $('#divAjaxAnswer').html(data.text).show(); alert('I'm here'); $.scrollTo( "#footer", 20 ); ... <div id="divAjaxAnswer" class="results"></div> <div id="footer">Scroll... I'm here</div> What I'll want to do? After inject ajax responde this code needs to scroll to footer element. What's wrong? Cheers Marco Antonio
[jQuery] Accessing named anchors from the URL...
New to jQuery, having fun with it. Is there a section in the docs concerning accessing the URL string? Reason I ask is, when a certain page loads from a URL such as "http:// www.site.com/page.html#section123" I want the page to scroll (smoothly if possible with the core library) to that anchor-named section and then briefly highlight the div beneath the anchor. Markup would be: <a name="section123"></a> This paragraph text would be highlighted ...Rene
[jQuery] multi-directional sliding... is this possible?
Hello, I've working on a new design for my portfolio and I'm having some jquery issues... http://leifmiltenberger.com/test/slider.html I used this slider for the main content section: http://jqueryfordesigners.com/coda-slider-effect (I removed the prev/ next buttons.) But there's one thing I can't figure out... I want the "blog" link to drop the page down to the blog section of the site. Also, when I'm down at the blog, when you click on the other links, I'd like the site to scroll back to the top
[jQuery] Superfish Problem in Firefox
This image outlines the situation pretty well: http://farm4.static.flickr.com/3260/2694933261_597b4bb333_o.jpg Superfish is configured like this: $('ul#homeNavMenu').supersubs( { minWidth: 9, maxWidth: 27, extraWidth: 1 }).superfish( { delay: 200, dropShadows: false, disableHI: true, animation: {visible: 'show'} }); The problem is, if the mouse reaches the spot marked with the red X inside the text field, the menu stays visible in Firefox 3 (Windows). In IE7 the menu is hidden as expected
[jQuery] Clone Question
Hi Guys! I'm using jquery to clone one div area, but the clone object uses the same ID as the original, how can I generate the object with a diferent ID? Thanks, Pedro
show more/less text Click to flag this post
I have a page with <DIV> where it displays list of articles. On page load, it will display 100 character of description for each article. There will be a "more" anchor. When this is clicked, it will toggle and display the rest of the description and this time it will show a "less" anchor. If it is clicked again, it will toggle back. It is very similar to youtube. Since there are many DIVs, I had to assign a unique ID for each. How do I go about doing this. Thank you =)
[jQuery] How to remove gracefully and shift other cells up?
Hi, I am adding DIVs to rows where each row contains three cells. I'm adding them such that they might form HTML like so ... <tr> <td><div class="box-content">...</div></td> <td><div class="box-content">...</div></td> <td><div class="box-content">...</div></td> </tr> <tr> <td><div class="box-content">...</div></td> <td><div class="box-content">...</div></td> <td></td> </tr> But let's say I removed the very first DIV with class="box-content", making '<td><div class="box-content">...</div></td>'
[jQuery] UI/TABS: Can't enable multiple tabs in one call
Hi all, I want to enable/disable a couple of tabs at will. The docs say "To enable more than one tab at once reset the disabled property like: $('#example').data('disabled.ui-tabs', []);" I cannot get this to work at all - what element is the #example supposed to select? I've been trying on the element I called .tabs() on initially to create the tabs but that just does nothing.... TIA, --rob
XMLHTTPREQUEST and jquery cycle
Hello, I'm trying to use the Jquery cycle function in a XMLHttpRequest function. After having fetch the image values from a XML in a "listeProduits" array, I'm putting them into a div which will be use for the jquery cycle function. It appears corretly but the cycle function doesn't work. Here is the function Anyone has an idea ? function creerDiaporama (listeProduits) { var nbrProduits = listeProduits.length; var nbrDiaporama = Math.ceil(nbrProduits/5); var dureeSupp = 500; var jinitial=0; var idZone
[jQuery] How do you close a thickbox from an iframe and also refresh page
Hi, I've been trying to finish off a review section on my site but having trouble. I have a working review TB that pops up and holds the form for the review in an iframe. Once someone enters all the form info and submits it shows a thankyou message. At this point I would like the user to be able to click a button or link and close the thickbox containing the iframe and also refresh the page below it so they can see the review they have just added to the site. Here is a link to the test page - please
Effect .show - not working well in IE
Hi, I'm using a hover function to .show/.hide a layer with the attribute "normal". This works well in FF, the layer fades in smoothly. Trying the same with IE there is a problem. The layer appears at once without any fadeIn effect. But clicking on the close button the layer fades out correctly. Any idea what could cause this behaviour? thanks T.C.
[jQuery] DatePicker & Dimensions & DropShadow
<div dir="ltr"><div>I'm sure this is really simple, but can anyone help...</div><div> </div><div>Using the datepicker, as per:-</div><div> </div><div>$(document).ready(function() {</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>$("#id_dob").datepicker({ </div> <div><span class="Apple-tab-span" style="white-space:pre"> </span>dateFormat: "d/m/yy", </div><div><span class="Apple-tab-span" style="white-space:pre"> </span>showOn: "both", </div><div><span class="Apple-tab-span"
[jQuery] Is there a nice way to convert the Color object to #xxxxxx or just a Number?
<div dir="ltr">Hi, I am trying to find a way to convert the Color object to #xxxxxx format. I use the obj.css("color") to get the the Color object. First I tried to get an Number value, but failed to Google it out. Then I tried to parse it as a string, but IE and Firefox has different explanantion on the toString of Color object: --- IE gives #xxxxxx --- Firefox gives RGB(xx,xxx,xx) I don't know how other browser's behavior on this yet, so using "if...else..." will be at risk. Is there a nice way
[jQuery] What is the reason to introduce :gt selector?
There is already a .gt(n) funcion in the core. I've found it very confusing because it behaves differently that other selectors form css specs like e.g. :nth-child. It works globally on set of all matched elements after the selection process is performed what is different from css selectors which are tested for each element separately. For example it doesn't allow me for example select every non first <li> element of several <ul> lists because it will select only first <li> of first list instead
[jQuery] superfish shadow width problem
i'm using the latest version of superfish (1.4.7). i have both horizontal and vertical menus on the same page. i've adjusted the parameters on the vertical-superfish.css for a wider menu (12em instead of the default 10em) and i've got everything working except the drop shadow, which stubbornly remains at a 10em width in firefox 3 & ie7 (curiously, the non-transparent shadow displays "correctly" in ie6) . anybody out there have any ideas? let me know if you want any documentation; in the meantime,
[jQuery] Superfish, Slide up animation
Is there a way to add an animation to teh menu on mouseout? I would like the menu to roll back up. Any suggestions?
[jQuery] ie7.0.6 for vista showing false on dropdown menu: superfish
hi having problem in ie7.0.6 for vista only. it shows text false on dropdown menu. Can you help please? Location: http://www.acidgreen.com.au/projects/pulse/production/
[jQuery] Accordion: Linking the Title of an Empty Panel to a Different Page
Hi, I am using the accordion plugin and trying to get this functionality working. In respect to my demo, http://root.juro.at/showcase/questions/accordion-animation/accordion-animation.htm , I would like "Link 1" and "Link 2" to be treated as a normal hyperlink but the rest open the panels. Is this possible? juro
[jQuery] AJAX Anchors
How can I make a $.get() call whenever a link is clicked with an href="#anchor", with the word 'anchor' being various strings.
how do i return all the options from select?
<select name="test" id="test"> <option value="1">a</option> <option value="2">b</option> </select> how do i return all the options as a array? I am trying to find a equivalent to javascript's .options[] method, but I just cannot find it.
Adding click handlers in a loop
Hello, this is my first post, I tried searching for a similar post but couldn't so I would really appreaciate it if someone had the time to help me out. What I'm trying to achieve is build a table programmatically using DOM like so: var Html = []; Html.push('<table> ..... ') ..... Html.push('</table>') Inside the table I'm adding <tr> rows using a for loop like so: for (var index = 0; index < length; index++) { Html.push('<tr><td>......</td></tr>'); ...... } And inside each table cell
[jQuery] Lightbox/Zoom mashup
I am trying to find a solution that is like Lightbox but with an option to show a small box to show detail of the image in a separate box. Basically, integrate jqZoom into Lightbox. Anyone know of such a beast or how to mash them up? I tried but I am not getting the proper result. I used: http://www.balupton.com/sandbox/jquery_lightbox/ and http://www.mind-projects.it/blog/jqzoom_v10 Thanks -AP
[jQuery] Accessing sibling frame
I am trying to access a sibling frame, so this is why I am getting confused. There are 3 frames on my page, how can I access on of them? Also, it only has a name attribute, not an ID, can I cannot change this, can this still be called using jQuery? Essentially, I am wanting to remove a DOM element within another frame, that is not the parent or top. Here is what I used, which did not work: $("#targetID", sq_sidenav.content.document).remove();
[jQuery] Cross Domain Ajax
Hi, I wanted to load external content from what appears to be a cross domain. Domain to receive content: imperishableinheritance.com (WordPress) Domain to get content: tumblr.imperishableinheritance.com (Tumblr) I tried this $("#sideblog").load("http://tumblr.imperishableinheritance.com #content"); But I don't think it works due to the cross-site request. How can I translate this to jSON if that's what I need?
How do you load external file?
What exactly do I need to writhe as parameter for load if I want to load the content from an external URL right now, this works $(#data).load("localcontent.html"); but this doesnt (example) $(#data).load("www.google.com"); Any help is appreciated, thanks in advance
[jQuery] newbie event trigger question
OK, be gentle cuz I'm new to Events :) I've got a anchor tag that links normally to a second page. And, I've got another element, say, a DIV, that I want to define a click event for , so that whenever the DIV is clicked it fires off the anchor tag's click. something like this: <a href="http://www.cnn.com" id="link_101">a link to CNN</a> and this: <div id="div_101" class="linkeddiv"> click me </div> and then I tried something like this in document.ready() : $('.linkeddiv').click(function()
[jQuery] Backward Compatible Ajax Links - the best way?
I'm building a site at the moment that uses a flash music player I don't want to re-load. I have removed the use of frames from their old site and plan to 'upgrade' the links to AJAX functionality - so the page isn't re-loading. I have my HTML structure like this: <li><a href="./page/example" class="ajax">Example</a></li> And so far I have this... $(document).ready(function() { $("a.ajax").click(function() { var page = this.attr('href'); $("#content").load("ajaxpage.php?page=".page); }); }); I'm
[jQuery] Replacing DOM Elements While Maintaining Child Elements
Ok, I have this code (I know it's horrific). <td class="ms-sbscopes ms-sbcell"> <select class="ms-sbscopes" title="Search Scope" id="ctl00_PlaceHolderSearchArea_ctl01_SBScopesDDL" name="ctl00$PlaceHolderSearchArea$ctl01$SBScopesDDL"> <option value="This Site">This Site: Hirsch Branding</option> </select> </td> I want to alter this so the <td class=...> becomes a <div> (I don't need to maintain the classes) and the </td> with a </div> while maintaing the select control. I figured it's done with replaceWith
[jQuery] toggle expand/retract images on click
I'd like to display a "retract/close" image for div's that are open. Current toggle code: $(document).ready(function() { $('#details').hide(); $('a.comment').click(function() { var id = $(this).attr('id'); $('#details' + id).toggle(500); // alert(id); return false; }); }); On click event tied to: <a href="##" id="#randID#" class="comment"><img src="../assets/images/ common/btn_productDetails_open.gif"></a> <div id="details#randID#" style="display:none"></div> Default is a hidden <div>
[jQuery] Append element once
Hi, just learn jQuery today and have the first question. I want to append a line of html code with onclick, but I want to append it only one time no matter how many times the users click. How do I do it? The code below works but it appends the additional code after every click. ############# SCRIPT: <script> $(function() { $("#divZ2-title").click(function() { $("#divZ2").append("<strong>This is just added</strong>");}); }); </script> ############# HTML <span id="divZ2-title"><a href="#">jQuery Link
help urgently needed with callback function!!
Hi everyone. I have been stewing over this one for some time now. I understand that you cannot que non-effect jquery methods. Therefore i need to use a callback function. Please look at the code i am using for my gallery... $(document).ready(function(){ $("#gallery-thumbs a").click(function(){ var largePath = $(this).attr("href"); var largeAlt = $(this).attr("title"); $("#img2").fadeTo(1, 0.0, function() {
[jQuery] jQuery add additional attribute like "jQuery1216740106187" to any operated node(IE only)
<div dir="ltr">I just find out that every operated node by jQuery will be inserted a jQuery value in IE. So after a heavy use of jQuery, my page is fulfilled with jQueryxxxx tags: Any idea why this is happening? How to avoid this ? <div style="margin-left: 40px; font-family: courier new,monospace;">--------------------------- Windows Internet Explorer --------------------------- <DIV style="BACKGROUND: #fdfdfd"><U>JavaScript语言</U>: <A href="<a href="http://www.fayaa.com/code/view/50/">http://www.fayaa.com/code/view/50/</a>">测试字体2</A></DIV>
[jQuery] Ajax calls using jQuery and session cookies
When making ajax calls using jQuery libraries. Does all the cookies get send to the ajax target? Say the ajax calls "saveData.php" but I found that in "saveData.php" I can only see user's permanent cookies but not the session only cookies. Thanks
[jQuery] DOM not clearing in FF3 on page refresh - using jQuery .val()
Sorry if this has appeared elsewhere in the group. Im not sure if it posted the first two times!!! I have a problem in a pretty complex app I'm writing. I load a page, which populates some inputs with values picked up from a mySQL database, like so: (URL eg /projectDetails.php?projectId=12345) <input type="text" id="projectCustomerName" name="projectCustomerName" value="<?php print $projectCustomerName; ?>"> Not shown above, is that in the onKeyUp() event of that text box, I call a function which
[jQuery] DOM changes persist after page reload in FF?
Hi, First off, the caveat, I'm a noob. However, I have a small piece of code that is causing some odd behaviour in FF 2 and 3 but not in other browsers (IE6 & 7, Safari 3 are the ones I've tested). The code inspects a text input and on each keyup issues an ajax request. The target PHP file checks whether the input matches a string and if so the jQuery code then disables the text input field, scans the page for PayPal add to basket buttons (normally 7 off them) and adjusts each form hidden field amount
[jQuery] Cross domain problems
Simple problem (I think)... I am new to JS and ajax. I am building an ajax capability on a clients site. I am running into cross domain problems. If I get the page using the url form http://www.site.com but I do a load using the url form "http://site.com" (www vs. no www in the url) I get nothing but a js error. What is the best way to handle making sure that if the person is at the site with OR without the "www" in the url that the .load will still work?
[jQuery] Possible to cancel an AJAX request?
Hi, Is it possible to cancel an AJAX request once the wheel has been set in motion? Below is my call var response = $.ajax({ type: "GET", url: 'get_file_manager_preview.php', data: 'f=' + p_file, async: false, error: function(request, msg){ alert( "Server timeout: " + formDesc + ":" + msg ); }, success: function(request) { alert( "Saved" ); } }); What I would like is that after the AJAX request is started, there is a button on my page that reads, "Cancel", that stops the request. Again, not sure
[jQuery] Replacing DOM Elements While Maintaining Child Elements
Ok, I have this code (I know it's horrific). <td class="ms-sbscopes ms-sbcell"> <select class="ms-sbscopes" title="Search Scope" id="ctl00_PlaceHolderSearchArea_ctl01_SBScopesDDL" name="ctl00$PlaceHolderSearchArea$ctl01$SBScopesDDL"> <option value="This Site">This Site: Hirsch Branding</option> </select> </td> I want to alter this so the <td class=...> becomes a <div> (I don't need to maintain the classes) and the </td> with a </div> while maintaing the select control. I figured it's done with replaceWith
[jQuery] jquery 1.2.6 animations and firefox 3
Did anyone notice some jerkiness in animations with this combo? I have a fade in that's smooth in firefox 2, but when I run it in firefox 3, it doesn't really fade. Thanks!
Next Page