jquery

How to call javascript function only once during window resize event?

On jQuery resize event page it is said that: "Code in a resize handler should never rely on the number of times the handler is called. Depending on implementation, resize events can be sent continuously as the resizing is in progress (the typical behavior in Internet Explorer and WebKit-based browsers such as Safari an...

add value to checkboxlist using javascript/jquery

I want to add a value to a checkboxlist using javascript /jquery.The code below is my sample code function getExpertise() { $.ajax({ type: "POST", url: "Sample.asmx/GetExpertiseBySpecialization", data: "{sId: '" + $('#<%=ddlSpecialization.ClientID%>').val() + "'}", content...

jQuery tabs modify to auto scroll

Hi, I used the following tutorial to create a featured content slider for my homepage - http://www.queness.com/post/274/jquery-sliding-tab-menu-for-sidebar-tutorial What I was wondering though, how would I go about modifying the code to auto scroll to the next tab after x amount of seconds? I assume I would need to setInterval and trigg...

Select top level list items only with Cufom, Jquery

The below JS is selecting all of the list items, i need to select only the top level list item anchors. HTML and Cufon below: <script type="text/javascript"> Cufon.replace('#navigation ul#nav li a', { textShadow: '#dedede -1px -1px', hover: { color: '#2a668f' } }); </script> <ul> <li><a></a></li> <li><a></...

jQuery Dialog makes scrollbars appear in main content

This test of jQuery dialog makes the scrollbars appear in the main content when the dialog is opened. When I touch the dialog resize, the scrollbars go away. Is it the way I defined the dialog or too much content? Click the [!] in the top right corner to see this. Platform: XPsp3, browsers: FF3.6.3, IE8, Safari 5 Thanks ...

CSS Hover using jQuery to fade

I have a simple link that changes when the user hovers, so something along these lines: a.mylink { background: url(..) top left no-repeat; width: 100px; height: 100px; } a.mylink:hover, a.mylink.jqHover { background: url(..) top left no-repeat; color: red; } Changed my mind about what I want to happen, basically I wan...

jQuery accordion header

I want to add some toolbar icons in header of accordion but when i add onclick event handler is in header also nad its toggling accordion. How can i define toggle accordion only for part of header. Header property does not help because then it minimizes the width of accordion depending of the header width ? ...

jquery, jsonp, error handling & security issues

in jquery 1.3.2 for jsonp requests i used to this var _options = { url: 'someexternal_url', type: 'GET', dataType: 'jsonp', success:_aSucFnToHandle, error: _anErrFnToHandle }; $.ajax(_options);// this ignores any error if occurs on url so i added below script and changed my ajax reques...

Cufon problem when animating containing divs in IE6/7

I've come across a bug in Internet Explorer's 6 and 7 when animating the containing div of cufon'd text. I used the following tutorial to create a featured content slider for my homepage - http://www.queness.com/post/274/jquery-sliding-tab-menu-for-sidebar-tutorial The problem I'm having is that when the content slides to the next tab...

Selecting textbox value when pressing the next button

Hi All, I have a grid of textboxes. When the user presses the arrow button I need the cursor to select the contents of the textbox in the direction they have just pushed. I have tried using JQuery's .select() method, but this doesnt seem to work in IE. Could you give me suggestions on how to get this working? Thanks in advance. ...

When to use dom:loaded / document.ready events

When I use methods that "append" data to existing elements using prototype/jquery, is it a good practice to wrap such logic inside document.observe("dom:loaded", foo)/$(document).ready(foo) functions? ...

jcoverflip customisation

i just found jcoverflip it's a great script but i'd like to customise it. instead of this scrollbar i'd like to use simple left/right arrows what function do i have to call? i found functions called next and previous but i don't know how to call them properly. the js is here -> http://www.jcoverflip.com/files/docs/jcoverflip-demo/jquery....

How to apply some actions to selected text of a div in jquery?

I need to apply some styles to selected text inside a div, like we can do in MS Word. I could not find any way to get the selected text :( Thanks ...

Can safari/chrome/opera make ajax requests while an upload is in progress?

Basically i am making a simple ajax request function upload(){ setInterval(function callMeOften() { $.ajax({ method: 'get', url : 'uploadinfo.php?unique_id=<?php echo $some_uniq_id; ?>', dataType : 'text', success: funct...

what is the sequence of jquery pageload events?

are there any good guides as to which events happen in which order (and what triggers them)? ie: $(document).ready $(window).ready $(window).onload EDIT: are there any other (pageload) events that i'm missing? ...

JQuery DataTable Cell from a row click

Hello all I am trying to implement a function on jquery datatable, that returns the 1st and the 4th column of a clicked row i am following this example, which allows me to manipulate a clicked row http://datatables.net/examples/api/select_single_row.html thinking that i can change this handler to do the read cell value procedures and...

Best-practice for javascript configuration on new web project

Hi all, I would like to ask a question about a new and large scale web project's javascript requirements. We will use lot of javascript, ajax requests, jquery, json objects & jquery plugins in our project. We planning to store global variables and lot of default values in a global site configuration file with php class and ini file on s...

make javascript function callback-ish

Hi, i'm having a javascript function using jquery: my.namespace.loadSomeStuff = function() { $.get('/Services/loadStuff', function(c){ $("#stuffDiv").html(c); }); }; and am trying to write unit tests for this. now, since this function is not really returning anything and loading some stuff asynchronous using jquery's...

jQuery is behaving really odd

I have a jQuery script that fades in and fades out between containers inside their parent container. Depending on the button (design, web) clicked, it determines which container (#design, #web) fades out and which one fades in in its place. Now, the crux is here, both these containers (#design,#web) differ in height, so when I fade out ...

jquery lightbox in codeigniter help

am having a hard time trying to make jquery lightbox in codeigniter work, what I want to happen is,pop a youtube thumbnail and play the video on the lightbox.I stored it outside my application directory,I included it in my config file like this $config['jquery'] = "js/jquery1.4.2.js"; then I include on the view file like this <script t...