jquery

How to change CSS using jquery

I am trying to change the css using jquery: (I am a very early jquery beginner) $(init); function init() { $("h1").css("backgroundColor", "yellow"); $("#myParagraph").css({"backgroundColor":"black","color":"white"); $(".bordered").css("border", "1px solid black"); } What am I missing here? thanks!!! ...

sexy-combobox plugin not working inside of jquery dialog

I'm attempting to use this plugin, which turns a select list into a combo box where the user can type their selection in, in addition to the select list functionality. http://vladimir-k.blogspot.com/2009/02/sexy-combo-jquery-plugin.html The issue I'm having, is when the select list is inside of a jquery dialog, it no longer has the dro...

jqGrid default sort order?

It appears that the jqGrid sortname and sortorder properties do not actually cause your data set to be sorted - they just cause the up/down arrows to be displayed. How can you get your data set to sort on download? The sort works well when you click the column headers but I want a default sort to be applied to our data. Update: Wh...

how to use jquery to "live search" (filter) items on a html select?

I guess the title says it all. I have a simple text input and a select (multiple). I want to filter items from that select according to input.. ...

Get ID from URL with jQuery

I've got a url like this: http://www.site.com/234234234 I need to grab the Id after /, so in this case 234234234 How can i do this easily? ...

Is there a way to make jQuery .js file only contain the functions I use?

Well, I am using jQuery in my project, but I really don't use any effects, only the $.ajax function, is there a way to make jQuery .js file only contain that function or maybe a similar function that doesn't depends on jQuery? I am coding a library, so I don't want to have a jQuery dependence. ...

How can I count the number of referrals from a certain URL

Lets say there's a landing page. I need to be able to count the number of referrals coming from 4 different URLs. So then I can come back later and see how many came from each. Can someone show me how this can be done? Can this be done with javascript using an array and the referrer property or would i have to use PHP thanks so much i...

How to change img src on document ready before browser downloads images?

On my page I have some images on thisdomain.com/images. on document.ready(), I change the src attribute of images to thatdomain.com/images. Firebug's Net tab shows me that images are downloaded from both thisdomain.com and thatdomain.com. How can I prevent the browser from downloading images from thisdomain.com? $(document).ready(fun...

Help with jQuery Delegate

Im trying to use .delegate to assign click events to dynamically loaded content. As you scroll additional content is loaded via Ajax. Here is the jQuery I have written which works for the static content but not for the content that gets loaded dynamically: $('#fav').delegate("#submit", "click", function() { var favid = $("input#fa...

A way to chain a sequence of events in JQuery?

I have a few things going on that need to be done one after the other, not all methods have callback features so what's the best way to go about chaining these events together? I have something like this Close slider > Delete old content > Append new content > Re-open slider I'm new to JQuery so this may seem obvious but I appreciate ...

Using jquery colorbox to unhide a DIV to show password box in the colorbox

Hello I am using colorbox and jquery form (http://colorpowered.com/colorbox/) I am simply stuck on what do next. I am trying to use jquery colorbox to unhide a DIV to show password box in the colorbox. I took out some of the relevant scripts to make the code more readable and increase my chance of receiving help. This is the javascript ...

remove all occurence of anchor tags from a string without removing thier child node

I have an html string and I need help transforming this: <table > <tr> <td><a href="/link.html" onclick="javascript:aFunction()">some text</a></td> <td><a href="/anotherlink.html">some more text</a></td> </tr> </table> to this: <table > <tr> <td>some text</td> <td>some more text</td> ...

jquery slider with dragable scroller and back next buttons.

I need a jquery slider image gallery where the images move with a scrollbar slider and also when next and previous buttons are clicked, I found various scripts with the scrollbar but haven't been able to relate the buttons. I would really appreciate it if you could help me. Regards, Roni ...

jquery prepend working in all borwsers except IE7

Arrg! My site (in progress) is working great so far in all browsers I've tested to-date (firefox, safari, chrome, and IE8) but not in IE7 (I dont know about IE6 or other browsers) .... I'm not positive but i think the issue has to do with the use of prepend() in my jQuery. the main issues are the main menu (should show up in the blue hor...

jQuery select the parent of a div

I have this html: <div class="vt ddsitem"> <a href="url"><img class="pt" id="xyz1" src="url"></a> <div> <img class="updown" src="images/updown.gif"> <a href="url"><img class="bin" src="images/bin.gif"></a> </div> </div> <div class="vt ddsitem"> <a href="url"><img class="...

jQuery: How to get content not visible with overflow: hidden?

I'm trying to span content across multiple pages (divs) set at a height of 950px per div, so I can properly output to pdf. I start off with one div which nests all of the content using overflow: hidden. Ideally I'd like to use jquery to find content which is out of the viewing scope (hidden), but I can't see any functionality to do thi...

Using .css('top'); in IE and Safari that doesn't have an explicit top value returns 'auto'; Any way to get a value?

Hi, I have an absolutely positioned [element] such that in the CSS, I've explicitly set its left property to -9999px. I have not set the top property. I cannot set it, since I want the element to "stay" where it is in the DOM (even though it's out of the document flow) When I call [element].css('top') in jQuery, FF returns a value. I...

add something to Jquery selection and format

Ok, so i'm trying to create an address out of some bits of code from another spot on the page. The code i'm trying to create the address from is this: <div class="adr"> <h3 class="name fn">Boardwalk Audi<div class="separator">|</div></h3> <h4 class="street street-address">5930 West Plano Pkwy</h4> <h4 class="city"> <span class=...

Can't change innerHtml neither with plain JavaScript not with jQuery

Here is source code of the simple page: <html> <head> <title>Test</title> <script src="jquery-1.4.2.js" type=text/javascript></script> </head> <body> <div id="divText">Original</div> <script type="text/javascript"> var vText = document.getElementById('divText'); vText.innerText = 'Changed'; alert...

Understanding javascript function calls in format of myFunc(arg).something()

I'm trying to understand the format of the Javascript functions that jQuery, among other people, use. For instance jQuery(arg).hide() or $("#obj").hide I'd like to write similar format functions but I don't understand how. I know how to write function myFunc(args) { } but I don't understand the second part ie the .hide() is that a ...