jquery

Inserting text into a textarea using .load() in jQuery

Hi, having a bit of a nightmare, I am trying to use jQuery to insert some text taken from a .load() call into a form field (textfield) after a user logs in (basically prefilling some known details). It is #bookName and #bookEmail I am having problems with The code I am using is: $.ajax({ type: "POST", url: "/ajax/login....

Does jquery cycle plugin work with livequery?

I use this code and it's working fine on main page, but it doesn't work when you get new content through ajax (f.i. clicking on 'Recomendados' link) $('.videoList').livequery(function(){ $(this).after('<div id="nav">').cycle({ sync: 0, fx: 'scrollLeft', pager: '#nav', pagerAnchorBuilder: function(idx, slide) { var imgurl = $...

Google Maps within a dynamically loaded jquery Accordion

I'm trying to load a google map within a jquery ui accordion with contents loaded by ajax. $("h2", "#accordion").click(function(e) { var contentDiv = $(this).next("div"); if (contentDiv.children().length == 1) { contentDiv.load($(this).find("a").attr("href")); contentDiv.ready(function(){ var latlng = new google.maps.La...

Generate canonical / real URL based on base.href or location

Is there a method/function to get the canonical / transformed URL, respecting any base.href setting of the page? I can get the base URL via (in jQuery) using $("base").attr("href") and I could use string methods to parse the URL meant to being made relative to this, but $("base").attr("href") has no host, path etc attributes (like win...

JQuery fadeIn after src changed but fadeIn on the previous src anyway !

Hello ! I have a jquery bug and I've been looking for hours now, I can't figure out what's wrong... I have this code : $(document).ready(function(){ $('#ulPhotos a').click(function() { var newSrc= $(this).find('img').attr('src').split("/"); bigPictureName = 'big'+newSrc[2]; $('#pho').hide(); $('#imageBig').attr("...

Using jQuery to gather all text nodes from a wrapped set, separated by spaces

I'm looking for a way to gather all of the text in a jQuery wrapped set, but I need to create spaces between sibling nodes that have no text nodes between them. For example, consider this HTML: <div> <ul> <li>List item #1.</li><li>List item #2.</li><li>List item #3.</li> </ul> </div> If I simply use jQuery's text() method to ...

What is the best practice for including jQuery ext functions?

Hey everyone, Currently I have a file that I named JQuery.ext.js which I am including in all of my pages. Inside this file I have numerous functions that do things like the following, (function($) { /** * Checks to see if a container is empty. Returns true if it is empty * @return bool */ $.fn.isEmptyContainer ...

jQuery: intercepting out going link and adding parameters

When a user clicks a link on my page, I need to, before it gets actioned by the browser, add the param Hello=True to the url. So, the user clicks MyPage.aspx in and gets sent to MyPage.ASPX?Hello=True instead. Has to be client side, preferably using jQuery I can add an attribute to the tags if needed. Ian ...

Loading template with variables from form fields using jQuery & php

I am trying to create a form that generates an html template. I have the template in a hidden div on the page and am using jQuery to create a new window with the template html, but I can't figure out how to load the contents of the form fields into the template. I know I should probably be using AJAX, but I don't know where to start. ...

jquery .inside() ?

I was wondering if it was possible to insert content inside html tags. So say you have a h4 tag: <h4>Some Header</h4> And you want the text to also be surrounded by a span with a class of "line". Like so: <h4><span class="line">Some Header</span></h4> I know about stuff like .after() but is there something like .inside() to do this...

Need Help with Jquery TableSorter Pager plugin.

Hi I am using the tablesorter plugin: http://tablesorter.com/docs/ with jquery 1.4.2 Now my problem is this. The user can dynamically add rows to the table. But this seems to mess up the paging. Like first it gets added to the first "page" of rows but if you would go to the second page and you go back to the first page. You newly recor...

To jQuery or not to jQuery?

I rather enjoy adding practical eye-candy to the networking community I've been developing but as things start to stack up I worry about load times. Is it truly faster to have users load (a hopefully cached) copy of jquery from Google's repositories? Does using jQuery for AJAX calls improve/reduce efficiency over basic javascript xmlHT...

jQuery datepicker calendar - call to function updates database

So I'm using the datepicker plugin to make an availability calendar. Here is my javascript: http://pastebin.com/H7D9PcAg When dpSetSelected() is called it is also calling dateSelected() which triggers the AJAX call to my PHP script. I need a way to only update the database if the date is clicked on and not pre-loaded. When I pre-load th...

Is it possible to create a nav slideshow using Canvas divs?

I'm trying to implement the sliding nav as described in this simple tutorial: http://sixrevisions.com/tutorials/javascript_tutorial/create-a-slick-and-accessible-slideshow-using-jquery/ But rather than using images, I'd like to use charts from this charting package: http://www.highcharts.com/documentation/how-to-use I've found that wh...

jQuery Galleria plug-in: Make auto-play?

I am using this jQuery plugin It is very nice, but I can't seem to figure out how to get it to auto-play. (automatically transition to the next image at an interval) Has anyone else gotten this to do that? ...

How do you add a scroll bar to a div?

I have a popup that displays some results, and I want a scroll bar to be display since the results are being cutt off (and I don't want the popup to be too long). ...

jQuery Ajax: Copy - Paste thingy

Hi everyone, I have a form where a check an input field for its value and then i do an Ajax call using the typewatch plugin ( a small little thing which detects that the user has stopped typing after a predefined interval ). It works great. As this field is a "coupon discount" in an order form, the value could be entered by copy pastin...

tail -f in a webbrowser

I've created a Python script that monitors a logfile for changes (like tail -f) and displays it on a console. I would like to access the output of the Python script in a webbrowser. What would I need to create this? I was thinking about using Django and jQuery. Any tips or examples are greatly appreciated. ...

jquery - dom manipulation

I would like to show in dialog all elements with specific class. The dialog should hide the rest of the page. So for example: On this SO page I want to show all elements with class="user-info". Those elements would be shown in dialog with same width and height and same css and everything else would be hidden. It would be like cutting th...

How do I "find" in Jquery?

$("#start").find(divs where class=desc).show() <div id="start"> <div class="desc" style="display:none;"></div> </div> How do I do that? ...