jquery

jquery delegate problem with jquery templates

Hi all, I've been using the jQuery templates code (jquery.tmpl.js on github) and it's been working very well for me. However, I'm trying to attach events to the content using delegate and it's not working. Here is my simplified HTML structure after the templates are inserted: <!-- static in the html file --> <div id="container"> <!--...

Javascript/Jquery

I have code for autosuggestion while typing in a text box written in Javascript and PHP. When I start typing a number I get a list of matching numbers and I'm able to select one of them with the mouse click. Now I have an other text box which should display a list of numbers based on the selection from the first textbox. I have no clue o...

jQuery Alert Box

Is there a good way to set an alert with jQuery? i have a PDF that i need my visitors to agree to before the proceed... So: User Clicks PDF link Alert Box opens: "you must agree to our statement before we give you this PDF" I Agree button (PDF download proceeds) / I Disagree Button (box closes and original page is displayed) I...

jQuery: Index of element in array where predicate

I have an array of objects. Each object has, among others, an ID attribute. I want to find the index in the array of the object with a specific ID. Is there any elegant and simple way to do this in jQuery? ...

Add text after element that contains string.

I want to write an extension for Google chrome that detects snippets of source code on web pages and automatically copies them to the clipboard. I'm new to javascript and jquery, so for the first step, I wanted to try a very simple case. Using this site as an example: http://www.swharden.com/blog/2010-03-05-realtime-fft-graph-of-audio-...

Jquery Hide Class when no class is present

I have some text below called (16 Courses). I need to hide only this text, but I can't seem to hide it no matter what I try using jquery. Is there any help someone could provide so I can hide on this text? <div id="programAttributes"> <div class="left" id="credits"> <h3>Credits</h3> <h3 class="cost">48</h3> (16 ...

Overriding css with jquery/javascript

I have a table whose border is set as 1px solid silver from an external style sheet(some .css file). I have no control over this file. This is the css: my_table tbody td { font: 8.5pt verdana, sans-serif; border-top: solid 1px silver; border-bottom: solid 1px silver; overflow: hidden; padding: 0px 3px 0px 2px; } Now I want to change ...

jquery listview?

I dont see any canned jquery ListView plugin. Does one just not exist? unless i get better advice here, gonna go down this route... http://www.west-wind.com/weblog/posts/300754.aspx to be clear, i basically want some funtionality that processes and ajax request, and for each item in the response outputs some html. The html would be ...

javascript setInterval not working for object.

SO, I'm trying to create a javascript object, and use the setInterval method. This doesn't seem to be working. If I remove the quotes, then the method runs once. Any ideas why? Also, I'm using Jquery. <script> $(function(){ var kP = new Kompost(); setInterval('kP.play()', kP.interval); }); var Kompost = function() { this.inte...

jQuery + RGBA color animations

Does anyone know if jQuery can handle an animation like: rgba(0,0,0,0.2) -----> rgba(0,255,0,0.4) I know there is a plugin to handle color animations, but this might be too modern? ...

How on earth do I go about getting a single value out of this huge JSON object?

All i need to get is the jpg file "url" value in the results chunk. JSON is quite new to me... { "ok":"ASSEMBLY_COMPLETED", "message":"The assembly was successfully completed.", "assembly_id":"99b0303243fd4a2f5da38111677aca71", "assembly_url":"http://api2.vivian.transloadit.com/assemblies/99b0303243fd4a2f5da38111677aca71", ...

Using $(this) when calling an element-based plugin

Hi, I'm creating a plugin for jQuery. I wont attempt to explain the plugin here, so lets say for simplicity that my plugin opens an alert when you click on the targeted element. Here is a simple version of my plugin. (function($) { // Options var defaults = { message: 'Default message' }; var options = $....

Tablesorter and Pager: how to install?

I have my tablesorter with zebra up and running just fine but I can't seem to install the pager properly. When I include the pager.js file like you see below, it breaks my sorting all together. The sorting works fine when this file is not loaded but I get no pager. Someone, what am I doing wrong? <script type="text/javascript" src="/s...

Toggling between 2 bookmarks (or see a page, and load another page from bookmark) won't work with jQuery History plugin

Anyone knows how to fix this jQuery History plugin? (for ajax history and bookmark) In http://github.com/tkyk/jquery-history-plugin/issues#issue/5 This is the details: My app using IE 8's IE 7 Compatibility Mode as well as http://www.serpere.info/jquery-history-plugin/samples/ajax, which is using IE 8's default mode, seem to have thi...

Does jQuery actually use camelcaps to reference multiword css fields?

In jQuery, are multiword css fields condensed to camelCaps? For instance. $("#item").css("marginBottom"); not $("#item").css("margin-bottom"); On my machine running Firefox 3.6.6 with jQuery JavaScript Library v1.4.2, the answer seems to be no. doing $("#item").css("marginBottom"); gives me a warning about invalid css field and ...

Jquery Nth-Child question

Hey Guys, How, using Nth-Child could I add a class to every red box? I have tried using: $('#mainnav li ul li:nth-child(3n)').addClass('yes'); Markup: <ul> <li><a href="">SUUB</a></li> <li><a href="">SUUB</a></li> <li><a href="">SUUB</a></li> <li><a href="">SUUB</a></li> <li><a href="">SUUB</a></li...

Jquery iframe help

Hello, I'm pulling in a registration form from a third party on my company's website (http://www.pershing.com/events/customer_conference/register/index.html). The user selects the type of attendee they are and hits "Next". At this point they are asked to input their information. The problem happens when the user hits "Back". T...

The best Ajax History and Bookmark plugin currently available

It seems that each Ajax History and Bookmark plugin has some minor bugs, ranging from Really Simple History http://code.google.com/p/reallysimplehistory/ jQuery History plugin http://www.mikage.to/jquery/history/rbbs.cgi?id=RA12733222240679954806&amp;focus=1 Ajaxify http://max.jsrhost.com/ajaxify/ The bug is either not firing off th...

How to utilize javascript on Adobe Dreamweaver CS4

Hello. I am working on my personal website and am learning javascript (started yesterday) - My computer is a Mac and I couldn't find on the Internet how to utilize javascript on Adobe Dreamweaver CS4. Specifically, I am trying to use a photo slideshow called Galleria. On PCs, they say to drop the .js file into one of Dreamweaver's folde...

jquery css class problem

There are 2 classes for the same tag. class .bt1 set as default in html code. I need this p tag to change its class on click and save it, and when I click on this p tag I need it to be 'bt1i' class and 'bt1i' onclick function start working. Can someone help me to understand why it do not work and where is the error. As I understand wh...