jquery

How to Mimic Yahoo mail's tabs using jQuery

Attempting to Mimic the Yahoo Mail Tabs. Been able to set up the add-tab functionality. But can't get round to; i)ensuring that the user doesn't add duplicate Tabs ii)ensure that all tabs are closable apart from the first Anyone know how I can go about this? ...

Custom Jquery slideshow doesn't want to reset?

Hello, Under $(document).ready(function(), I have the following code: num = $("#mainContentCategoryLinksWrapper > div").size(); This makes num equal the length of the children of #mainContentCategoryLinksWrapper. Currently, this equals 4. Above the $(document).ready(function( I have this: var timesRun = 0; function slideshow(){...

Javascript/JQuery - How to get number of specific child elements

I wish to get the number of all TR elements that have a input element in them somewhere. How should I proceed ? Html : <tbody> <tr> <td>Ignore this item 1</td> </tr> <tr> <td>Ignore this item 2</td> </tr> <tr> <td><input blablabla>... Include this TR...</td> </tr> </tbody> Thanks! ...

JQuery: is it possible to instantiate a class on client and pass it to $.ajax to post?

what i mean by that is: i have a class called Customer: public class Customer { private string _firstName; private string _lastName; public string FirstName { get { return _firstName; } set { _firstName = value; } } public string LastName { get { return _lastName; } set { _...

jquery .unload problem in IE

Hi, I have the following code that works flawlessy in FF, but in IE I get an error that says "invalid property value" The code in questions is as follows: pageOpen = new Date(); dropper = new Image(); $(window).unload(function() { pageClose = new Date(); sionara = (pageOpen.getTime() - pageClose.getTime())/-1000; dropper.sr...

Where to put my $(document).ready(function(){ When I have methods in a .js

I created a somefile.js where somefile.js contains some jQuery method. So for instance it contains this function: function showWindow(divID) { var dialogDiv = $(divID); dialogDiv.dialog ( { bgiframe: true, modal: true, autoOpen: false, show: 'blind' } ) ...

jQuery append HTML with javascript link

I have a situation where I should append html with jQuery. Within this html there is an a-tag with javascript as link. How can I solve this? $(".messages-wrapper").append('<li class="chat-wrapper"><a class="chat" href="javascript:openChat('http://domain.com/Messenger.aspx'"&gt;Chat öffnen<span></span><small>Chat öffnen</small></a></li>...

jQuery UI Tabs And Dialog - How to confirm switching tabs with confirm based on the Dialog plugin?

So, the goal is to confirm switching to another UI tab using UI Dialog plugin. Using common confirm method is simple: jQuery("#tabsContainer").tabs({ select: function(event, ui) { return confirm("Some confirmation message..."); } }); but how to to achieve same behavior using Dialog modal box? I think I have to call: ...

Validating an e-mail field based on a specific domain

I have a site that will require a login by the users. The client will only only users from their company's domain to gain access. I need to validate the field based on an e-mail domain address. ie. only allow email addresses from @mycompany.com to go through. Can this be done with the jquery.validate plugin? I see where you can check to...

jquery: how to append elements to emtpy object

I want to create a set of options, that will be appended to every select in grid column <option> option 1 </option> <option> option 2 </option> ... <option> option N </option> but I don't know how to create a set of elements without parent element. appending to an empty jquery object doesn't work var options = $(''); options.appen...

jQuery - Problem with refreshing the image with same name using attr('src',newimage)

Hi Guys, I am trying to refresh an image on the page but it is not happening. I have a page with images and I need to update those images as required. To update an image I upload the image on a lightbox and then close the lightbox. The image on the page should update itself. Now, I tried $('#imageid').attr('src', newimage). I want to ma...

jquery ajax call returning error when its not an error

Hello, My JS Is: $(InitFavorite); function InitFavorite(){ var jList = $(".favourite_link"); var ids_to_check = {};//new Array(); $.each(jList, function () { var id = this.id; var object = id.split("_"); if (!ids_to_check[object[1]]) { ids_to_check[object[1]] = []; } ...

jQuery wait for ajax call to be over before continuing

Hi all, I have a problem with a jQuery ajax call. I need to wait for the call to be finished in order to return a value. However, the script seems to jump ahead and not wait for the call to be over. my function then returns "undefined". I have tried to use the .ajax() method and set the value of async to false, but this would not work ...

Changing a form's action attribute in IE?

Hey. I'm trying to set a hash value in a form's action, to keep it when the form is submitted. Firefox allows me to update the hash and redirects accordingly, but IE doesn't. I initially thought this was related to IE not allowing hash values in the action attribute at all, but it seems I can't dynamically set the action at all in IE ...

jeditable dynamic target value

I'm using jeditable and it works really great! I'm just having some trouble figuring out how to dynamically change the target URL. jeditable is bound to a table of values that I want to edit inline. So I have: <td id="<%= col.id %>_<%= i.id %>" class="edit"> The id is a mashup of two values I need to know to edit this item on the se...

How to run javascript on an ajax output?

I am using jquery-ui tabs and ajax to load the content of the tabs. Here is my javascript: $(document).ready(function() { $("#tabs").tabs({ fx: { opacity: 'toggle' } }); $('.hd_item').hover(function() { //Display the caption $(this).find('span.hd_caption').stop(false,true).fadeIn(600); }, function() { ...

$ is not defined

I cannot figure out why it's still not recognizing jQuery syntax when I clearly have included the jQuery library right before my $(document).ready <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; <html xmlns="http://www.w3.org/1999/xhtml" > <head id="Head1"...

[jQuery] Animate hidden hyperlink to display:block

Hi guys, given a hidden hyperlink (hidden by setting display: inline in a css file), how can I achieve to animate this hyperlink to 'display:block'? Neither show() nor the following code .animate({ display: block }, { duration: 500 } do work! Anny suggestions? Cheers, cube ...

JQuery UI drag and drop doesn't notice DOM changes happening during the dragging ?

Hi everybody, I have a html table in which each line (<tr>) represents a group of client computers. Each line can be expanded to show the clients belonging to the group. The <tr> containing the clients are always generated but hidden and showed when clicking the plus button at the beginning of each line. The clients themselves (they ar...

jQuery Flip! links inside divs

Hey there. I want to use Flip (http://lab.smashup.it/flip/) for one of my projects. But I want the links to make the flip action inside the divs that are going to be flipped. I stumbled across a question here and the reply was very helpful, and by using that codes I managed to achieve what I want. But now the issue is when the page first...