jquery

Cannot create a jsTree inside of a jQueryUI tab

I am not able to create a jsTree inside of a jQuery UI tab. If I create the jsTree outside of the tab, it works fine. Does anybody know if jsTree is incompatible with jQuery UI tab? My page is below. If I replace the following line var treeContainer = jQuery("#tabTree"); with: var treeContainer = jQuery("#pageTree"); Then the tree...

Scroll resets in a div when the div is hidden

I am using jquery UI tabs and when I switch tabs any scrollable divs that I have inside that tab reset their position to the top of the screen when I tab away from it and back to it. Does anyone know how to prevent this? ...

Programming pattern to flatten deeply nested ajax callbacks?

I've inherited JavaScript code where the success callback of an Ajax handler initiates another Ajax call where the success callback may or may not initiate another Ajax call. This leads to deeply nested anonymous functions. Maybe there is a clever programming pattern that avoids the deep-nesting and is more DRY. Also, there is the proble...

Cover flow like jQuery plugins?

Anyone knows that any jQuery plugins or to build something similar to image effect/gallery like Apple OSX Finder - Cover Flow? ...

Conditional Statement as Hierarchy jQuery

Is there a way to make jQuery use objects in a conditional statement as an object in a hierarchy. For Example, I want to validate that something exist then tell it to do something just using the this selector. Like this if ($(".tnImg").length) { //i have to declare what object I am targeting here to get this to work $(th...

How to create Jquery products slider?

Hi all, I am trying to create jquery slider that could slide DIV's. I need something like jCarousel or jquery Moving Boxes. It should be simple sliding of 3 items at a time. <div class="all-items"> <div class="item"><img src="">Item text 1</div> <div class="item"><img src="">Item text 2</div> <div class="item"><img src="">Item ...

How to Adjust/Change Scrollbar Width

Is there a way to temporarily change the scrollbar width in FF or IE while I'm testing some layout code? I remember reading something a while back about this being related to resolution, but can't quite remember. I tried changing the resolution of the computer itself, tried increasing browser font size, but both didn't work. Update I'...

Is there any way to use jQuery like Ruby in IRB mode?

I love using irb to quickly check how my ruby code reacts. Im wondering is there a way to do the same say in Firebug or soem other tool? ...

get all elements under a mouse drag selection

Hi, You guys would have seen the image cropping tool which has a selection option (marque tool) created in javascript. http://marqueetool.net/examples/ Like this i want to get all elements under a selection. For example in windows we have mouse group selection of files and folders by dragging the mouse to select multiple files. Like th...

How can I position some divs inside an unordered list so they line up with the root element of the list?

I want to position all the divs to line up to the left on the same x coordinate so it looks nice. Notice the picture below, how based on the number of nested categories the div (and its contents) show up at slightly different x coordinates. I need to have the div's line up at exactly the same x coordinate no matter how deeply nested. N...

best way to ajax load-in external javascript files with jquery?

I have a one page web application, which means alot of javascript. External scripts like facebook connect etc most visitors wont use, so i'd like to know the BEST method of loading js files on an event (click, hover, timer etc). Idealy with jquery. ...

fullCalendar Font size

Hi, I am having issues setting the calendar font sizes to be smaller. I have changed setting a container div font size, no effect. I have also changed the fullCalender.css font from 1em to 0.5em and to a px size but the calendar text stays the same. Is there anything obvious I am missing, sorry to post if this is very obvious but I hav...

Multiple dropdowns, combination check and filter

Using Javascript / jQuery, I'm trying to build a "combination checker" that will take the values of three (but can be more) dropdown lists and filter the options based on a supplied list of allowed combinations. For example: DROPDOWNS Field 1: - value_1 - value_2 Field 2: - value_3 Field 3: - value_4 - value_5 COMBINATIONS - value_1...

performance: jquery.live() vs. creating specific listeners on demand?

I have a page with news item titles, clicking each one ajax loads a full news items including a photo thumbnail. I want to attach a lightbox to the thumbnails to show a bigger photo. I have two options (i think): .live() . $('img .thumb').live('click', function()) add a specific id based listener on callback of the news item cl...

Jquery clickable block

HI, I have this code for extracting the href and adding it to a parent block... $(".new-dev").hover(function(){ $(this).css('cursor','pointer'); $('this').$('a').css('color','#696969'); },function(){ $('this').$('a').css('color','#000'); }); What I want to do is make the a within the block change color on rollover. Unsure...

Jquery CheckBox Selection/Deselection optimally given X checkboxes

Hi guys, I have suppose say 'X' check-boxes(any input elements) in a Form and "M" option selection indexes ("M" less than equal to "X"). then how do i select the "M" option indexes/values and deselect the rest of check-boxes optimally? i.e.Suppose I have 10 Checkboxes and 5 Option Indices(eg: 1,2,4,5,8) then i have to select checkboxes...

Is there a nice javascript dialog box for JQuery that works with mobile?

Mobile browsers. Jquery dialog alert box. I don't want to use alert() because it looks ugly in web browsers. I'm building a website for BOTH mobile and web, so I need a dialog box that can work on both. ...

Getting value from key pair value into appended property using jQuery

How do I get the value from a key pair value into the rel property of an anchor tag? When I split the code to put the value in the correct place it doesn't work, the end of the a tag would appear on screen instead value wouldn't be applied. When I look at the resulting code in console in Firebug the rel and href swapped order so the rel...

jQuery UI, detect if options have been entered?

does any one know how to check if the called ui (custom) has also options inputed or using the defaults? for example: $('#selector').myUI();//does not have options. $('#selector').myUI({option:'foo',{op:'bar'}});//ui has options. $('#selector').myUI('value');//ui has options. so if i was on: (function($) { $.widget("ui.myUI", { o...

stop script debug error dialogs occur in ie8 ?

I get this, clicking 'no' means the page displays flawlessly. it's refering to this part of jquery1.4.2.js: // Get the Nth element in the matched element set OR // Get the whole matched element set as a clean array get: function( num ) { return num == null ? // Return a 'clean' array this.toArray() : //...