jquery

How to remove div when iframe fully loaded with jQuery

Is there any way to wait until an iframe has fully loaded before removing a div? I'm using the following: $("#myButton").click(function(event){ $('#response').html("<img src='images/ajax-loader.gif' border=0> Please Wait - Loading!"); $("#myIFrame").attr('src', $('#url').val()); }); I'd like to remove the loading...

jQuery: what am I doing wrong? No errors.

function showComments(wallID){ $.ajax({ url: "misc/showComments.php", type: "POST", data: { mode: 'ajax', wallID: wallID }, success: function(msg){ var $msg = $('#showWallCommentsFor'+wallID).find('.userWallComment'); // if it already has a comment, fade it out, add the text, then toggle it back...

Load website in iframe dialog, jquery

Hi, I used the following example to display a website in an iframe on my website. I use the following code: $(document).ready(function() { $('a#verd').click(function(e) { e.preventDefault(); var $this = $(this); var horizontalPadding = 30; var verticalPadding = 30; $('<iframe id="externalSite" class="externalSite" s...

jquery draggable - Get containment to only contain handle

I'm using jQuery UI's draggable() to make some elements on my page draggable. I've got a handler and a containment set for the elements, but I'd like the draggable element itself to be able to hang out of the containment. I only want the handle to stay inside the container. Like below, pretend the * is the handle. +-------------------...

jquery ui autocomplete - handling xml results

Hi, For my xml object I have 3 nodes which I can grab. I'm trying to make a search box where the result is a link. I'd like to format what is shown in the drop down to be like this: Title (which is also a link provided by the URL node)   Description I am able to get the data but how do I format the results to look like that? I'd also...

Looking for jQuery Carousel with resizing elements. write from scratch or plugin?

I have a task ahead of me and I would like to plan the best way of attacking it before diving in. I need to make a carousel with resizing elements that animate similar to this page/plugin http://www.eogallery.com/ This gallery seems like it needs a lot of work and does not operate very smooth. I have used jcarousel many times and have ...

Use jQuery Event in inline JavaScript handler

I working on a project and am limited to handling JavaScript events via the inline handlers like onclick and onchange. However, I need my handlers to be cross-browser. I'm used to using jQuery for this, but since I can't use $('#id').click(function() { ... }) I'm having some difficulty getting access to jQuery-style events. For exampl...

javascript events and html.

Hi folks, Could you suggest the best way to keep focus on a particular input field on page? What I am trying to say is, no matter where user clicks on the screen, the focus should return back to this one particular input. I am thinking of a timer function that would check for focus every 500ms and if its not there, then bring it back. ...

Simplest way to implement slightly-rounded corners like on this example site?

I have to implement a tab control identical in terms of style to what can be seen here: http://funds.ft.com This is the example I've come up with so far: http://jsfiddle.net/MZUQK/ The biggest issue I'm facing is that the first one has 'rounded' corners that was implemented automatically by the ASP.NET AJAX used to develop the site. ...

jQuery: changing link text on success

In showComments (), an ajax call and on success i tried: $('#showCommentLink').text("Hide"); Im trying to change the text from show all comments to "hide" without results. <a class='showCommentLink' href='javascript:showComments($displayWall[id]);' style='cursor: pointer;'>Show all $isThereAnyComments comments</a> Have i missed som...

How do I get the correct URL for an MVC action when using Jquery/AJAX?

So I have my first MVC2 site that I'm working on and naturally I'd like to throw some AJAX in there. The problem is, is that I don't know how to get the URL for the action when passing in a URL parameter. Let me explain. The examples I've seen so far show the developer passing in strings like '/MyController/MyAction'. That's great, e...

How to get modal window location change event in javascript

I have modal popup of external site using jquery The external site is a login After completion of the login the modal window will redirect to a site. I want to: i) identify when the modal has redirected (login complete) ii) capture the modal url to acquire parameters from the url. How do i do this in jquery methods & javascript ...

jQuery select option list not updated fast enough in IE6

I have a SELECT list that I populate based on the results of an ajax call, then select one of the options based on a previously set variable. This works great on IE8, but on IE6 it does not. Here is the original function: function LoadCategories(jdata) { var options = ''; for (var i = 0; i < jdata.length; i++) { op...

Get Image results from Google Image API returning invalid label (jQuery)

Hello everyone. So I am trying to show x amount of images from google using the following code, but it keeps returning invalid label. Does anyone have any ideas? thanks in advance for your help. <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"&gt;&lt;/script&gt; <div id="google_imag...

How to perform ajax (jquery) functionality without using an external php file

Current scenario: I'm using the gmail oauth api to receive emails on a page. It's slow to load many, so I want to post each email on the page as it loads giving the user a chance to do other things on the site while the emails are still loading. There are a few files required require_once 'common.php'; require_once 'Zend/Oauth/Co...

jQuery: inserting DOM elements and attaching events

I'm working on a JQuery plugin and I am having a problem when creating DOM elements and attaching a click event to them. My code for creating the DOM elements is shown below: return this.each(function () { $this = $(this); $("<div class=\"" + settings.headingClass + "\">" + $this.attr("title") + "</div>").insertBef...

jQuery: onclick instead of href=javascript::

Yes ive been told a couple of time using onclick $('#linkId').click(function() instead of <a href='javascript:showComments($displayWall[id]);'> But then how do i store a variable in the function, like i can do with that above? I mean if a link is like this: <a id="linkId">test</a> where can i store a variable? ...

my jquery ajax request is not accessing the the database?

jQuery(function ($) { /* fetch elements and stop form event */ $("form.follow-form").submit(function (e) { /* stop event */ e.preventDefault(); /* "on request" */ $(this).find('i').addClass('active'); /* send ajax request */ $.post('recycle.php', { followID: $(this).find...

Animated height adjustment when innerHTML changes

I had this idea... let's say I have a DIV that contains some text. <div id="myDIV">Testing testing lorem ipsum</div> If I change the content of this DIV by doing something like $("div#myDIV").html("New text New text New text New text New text New " + "text New text New text New text New text New text New text New text " + "New t...

Looking for a website with a help system/tooltips

Hey, basically I am looking to gather ideas. I am making a help system for a website. jQuery tooltips and all. I just wanted to see how others have done it to get a better direction. The only problem is I cannot think of any sites off hand that have a help system or a tooltip system. Any suggestions? ...