jquery

How to target image with certain src path with JQuery

How would I go about targeting the below img with the src file? <img src="left1.gif" alt="" /> $('img[src=left1.gif]').hide(); doesn't work ...

Wordpress like display odd/even comments w/ different class - jQuery ?

I have following code where commentTable is the class. It works fine for current comments displayed on the page. $(".commentTable:odd").addClass("commentTableClass1"); $(".commentTable:even").addClass("commentTableClass2"); but what I really want is that this addition of class be 'live' even when new comments are added. I don't want to...

Implications of basing a web application on Open Source like PHP and jQuery

Hi! I am very new to web development and the use of Open Source. I have tried to read about the GPL, BSD, MIT, LGPL licenses, but cant seem to understand what they mean to me in real life. I am asked to develop a web based application for a customer. My agreement with them is that they pay a fixed fee for my development of the applica...

Uploadify and JSP/Java servlet

I just started working with Uploadify with our Java/JSP Applications and for that I use a servlet instead of the upload.php to do the upload to the server. I was wondering if there is any servlet example ?? or anyone has additional info for those of us that use JSP instead of PHP? I follow the example but it doesn't seem to do anything...

What does the '+new' mean in JavaScript?

Looking through the jQuery source in the function now() I see the following: function now(){ return +new Date; } I've never seen the plus operator prepended to the new operator like this. What does it do? ...

jquery tabs question - getting control of the ajax call it makes

I'm trying to use jquery tabs to make ajax calls to load content, but the data I'm receiving back is JSON encoded. On top of that, I have a lot of other stuff I want to do to that data once I get it and insert it into the tab. Is there anyway to customize the way ui-tabs makes the ajax call? Edit: actually, nevermind. You're not suppose...

Hover Item with JQuery

Is there a way to hover item using javascript? I don't want to create another class, I just want to hover item with javascript when my mouse pointer is not over this item. For example I have 5 items with the same class and I want to call hover on all of them when one of them is actually hovered. Thanks. ...

jquery - find last element with a certain class and pass it to php?

Basically, I have a list: <li class="list">fruit</li> <li class="list">vegetables</li> <li class="list">protein</li> And, I want to find the last list item, get the text from it, and then assign it to a php variable, so that: <?php $variable = 'protein'; ?> I'm fuzzy on how to get it into a php variable? ...

Jquery .keypress on a dynamically added input

Hello, I am currently adding an input via a .click event and then wanting to listen to any keypress that occurs on this input. However, the appended isn't firing any events after it is inserted (i.e. blur, keypress, focus). Does anyone have any suggestions? Thanks in advance! $("#recipientsDiv").click(function(){ $(this).append...

Is it possible to mix MooTools with Prototype and JQuery UI?

There are some things accross these which I'd like to use. I hope they've choosen clever naming conventions to prevent collisions with all their functions and classes? Does anyone use all these at once in one site? ...

Bind Event to Custom Plugin Function in jQuery

How would I modify my plugin to allow to load with an event on the call? Right now the plugin is loading when the page loads and I want it to work with .blur() or whatever event I want to assign it instead. Any help would be appreciated: // The Plugin (function($) { $.fn.required = function() { return this.each(function() { ...

The implications of the jquery plugin periodicalupdater

Hi all, In one of my previous questions, I've asked how I would replicate facebook's "new message" alert, that is shown in the head section of their website inline with the "inbox" link. The functionality allows data to be updated live, without the user refreshing their browser, and has since been integrated further into their technolog...

lightbox on newly inserted links not working

$(".overlay").lightbox(); $('.overlay').live('click', function(e){ e.preventDefault(); var url = base_url + 'ajax/getcolorboxhotel'; var data = $(this).next('span').text(); $('.hiddencontent').load(url, {id:data}); }); Please help! The code above works with links in the page while new links loade...

jQuery to get the text attribute of a checkbox

Hi I'm adding a check box to a page using the following statement; <script language="C#" runat="server"> protected void Page_Load ( object src, EventArgs e ) { if (!IsPostBack) { CheckBox XChkBox = new CheckBox(); //instance of System.Web.UI.WebControls.CheckBox XChkBox.ID = "someId" ...

what if google.load fails?

Curious if there was a simple way to have a fail-safe on google.load() The likely hood that google can't deliver the file but I can is pretty slim but I thought it might be interesting to have my own server be able to provide a failover in case the request bombs or timesout or something. any thoughts? I'm using MS visual studio 2008 /...

JQuery or AJAX with PHP?

Whats better to use with PHP, JQuery or AJAX and why? What would you consider better AJAX or JQuery? ...

Getting Jquery from google

There are some tutorials which suggest to use jquery path which is from google eg: <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"&gt;&lt;/script&gt; Is that safe to use in our projects? Aren't we dependent because we are not sure it will be there after a year or beyond? The r...

animate() not working for opacity in IE

I'm trying to animate a div from 100% opacity to 40% opacity WITHOUT using fadeTo(). I need to use animate(). It works fine in chrome/FF/safari, but in IE, the opacity doesn't animate, it simply changes to that after the animation is done. Happens in IE 7 and 8. I'm doing this: .animate({ width: new_...

Do not show the selected item of first dropdown in second dropdown

I have two dropdownlist which shows places in my asp.net MVC(C#) application. The First dropdownlist is to show the "From Place" and the second dropdownlist is to show the "To Place". The list of Places are say like : Alabama Alaska California Maryland,..... The From and To Place dropdownlists contains the above places. When i ...

jquery: for each request image load from URL, jquery not using already cached images

Hi guys i have wrote a small slideshow script and the problem is: Each time slideSwitch() function is called it loads images from server every time even when the image is cached in the browser cache. here is the code $(function() { playSlideshow = setInterval(slideSwitchTimed, 4000 ); }); function slideSwitchTimed() { $active ...