jquery

how do i set the size of jquery buttons?

My game is using jquery buttons for the inventory system. The problem is that the buttons are being resized automatically depending on the text in the button, which changes depending on what is in the inventory. How can I set the size of the buttons? I would also like to set a background image for the buttons depending on the item. ** ...

Help adding keyboard navigation to jflow jquery slider

Hi I would like use Jquery to add keyboard navigation to a Jquery slider. I am trying to use the left and right keys to trigger the previous and next buttons I already have but i can't get it to work. Can anyone see from my code where I am going wrong? <script type="text/javascript"> $(function() { $("div#controller").jFlow({ ...

jQuery UI Dialog in Tabs Using

Hi There, I use jQuery UI Tabs. Tabs in the dialog with the windows opened, but the UI plug-in does not work properly. The tabs need to be side by side. Unfortunately we could not get the result. <div id="tabs"> <ul> <li><a href="#tabs-1">tab 1</a></li> <li><a href="#tabs-1">tab 2</a></li> <li><a href="#tabs-1">tab 3</a></li> </ul> <d...

IE 8 & 9 not resizing container when width set in image.load

To see the issue go to this page and click the next text. The small, medium fullsize text will be off to the left (in IE8 or IE9, works fine in Chrome, FireFox) and will not be aligned with the left edge of the image. Code (http://moments.qa.chucksoft.com/Scripts/mvc/views/show/Showview.js) Line 154: ShowView.prototype.setImageSrc...

toggle a css color on hover

I am trying to add a highlight color to a class like this $(".common_box").hover(function(){ $(".common_box").addClass("hover_me"); }); this works but why doesnt this $(".common_box").hover(function(){ $(".common_box").toggleClass("hover_me"); }); when i hover over this nothing happens is there no u...

Better way to change a value and display results?

I have a form that displays a number of results based on the value of a select list "#maxrows" (25, 50, 125, 250 results). "#startID" is a hidden input thats value is set to 1 that starts the displayed data from the first one. So each time you click "#next/#prev" it adds or subtracts from its value. Through PHP i display two buttons #pre...

jQuery: how do I slide pages, but use only one nav?

I found this tutorial: http://www.queness.com/post/356/create-a-vertical-horizontal-and-diagonal-sliding-content-website-with-jquery And I like the way this site does their sliding: http://dknewmedia.com How do I do the sliding effect like dk new media, but with only a single nav? ...

Manipulate data returned from an AJAX call in jQuery

I have an AJAX call using jQuery: $('.add a').click(function() { $.ajax({ type: 'POST', url: '/ajax/fos', context: this, datatype: 'html', success: function(data){ $(this).parents('tr').before(data); } }); }); Once it runs, it adds a new row to a table. The row is ver...

jquery: bind multiple events, then unbind a couple of them? is this right?

bind multiple events, then unbind a couple of them? is this right? basically when you hover over the element, the background color changes, then changes back when you hover out of the element, but when you click the element i want to disable the hover effect and change the background color to a different color so the user knows that the...

Creating parent child element using DOM

I want to create the following DOM structure using jQuery. <li> <label> user <input type=radio> </label> </li> Here is my jQuery. $('<input>') .attr({type:'radio'}) .appendTo($('<label>')) .text('user') .appendTo($('<li>')) Some how it's not working or there is something wrong, what would be best practice here? ...

JavaScript/jQuery: Monitor change to element?

Is there any way (aside from creating a new event) that I can tell when a particular CSS class has been added to an element? ...

Why is this slideshow flickering?

Hi All, I have posted a sample jQuery slideshow on my blog here: robertmarkbramprogrammer.blogspot.com/2010/09/jquery-slideshow.html In Chrome, it is flickering on each picture. In IE and Firefox it looks fine, and in the standalone version it seems ok too (even on Chrome): http://robertmarkbram.appspot.com/content/javascript/jQuery/ex...

multiple attr selector in jquery?

How can i do this in jquery? $('#SomeId input[type="hidden" AND name="somename"]') ...

Chaining in Javascript without setting state

I like jQuery's ability to method chain commands ( .animate().css() etc ) which in the backend is achieved by returning the special variable "this". How can I implement a similar method of chaining without having to set state within my object. Take for example: that.getHospitalCoverDataStore().findBy('short_name').withValue('sam'); T...

jQuery: Attaching event, calling event

In one section of code I have this: $("#searchbar").trigger("onOptionsApplied"); In another section of code, I have this: $("#searchbar").bind("onOptionsApplied", function () { alert("fdafds"); }); The bind() is executed before the trigger(), but when I view the page, I never get an alert(). Why not? What am I doing wrong with...

How do I insert a block of html after a block that I have just rendered on the DOM

I am building a block of nested divs around a specific element on the client. I am using jQuery's .wrap() initially to get the first part of the block which is working fine. But now I want to attach the ending block after the element I am wrapping and I am finding I can't attach it to anything because it is all being created at the same ...

How would you optimize this code for a jquery 4 slide endless crossfading slideshow?

I have created a 4 image endless slideshow, which works more or less well (code below) crossfading each image and pausing for a short period. Then repeating in an endless loop. But I noticed the timing of the transitions is not always the same. I am also not sure if I have gone about this in the best way by calling the slides() function ...

Dynamic CSS3 prefix user agent detection

Is there a better way then using jQuery.browser, or equivalents, for determining css 3 prefixes (-moz, -webkit, etc), as it is disencouraged? Since the css is dynamic (the user can do anything with it on runtime), css hacks and style tag hacks can't be considered. ...

jquery prevent unwanted animation

I have a list of of 10 icons that make up a menu. By default, the first icon will be bigger than the others to show that it is active. When the user hovers over another icon, the first icon will shrink and the other will grow and if they hover out, the first icon will return to its big (active) state again. The problem is, if you quickl...

jquery css height setting not functioning properly

I'm trying to use some jQuery to set the left and right columns of my product and catalog pages (with a class of .columns) to the height of my #detail <div> which has some data pulled from a SQL database. So, I am using this jQuery code: $(document).ready(function() { detailHeight = $('#detail').css('height'); columnHeight = detai...