jquery

Toggle row visibility one at a time

I have a couple of tables with similar structures like this: <table> <tbody> <tr>content</tr> <tr>content</tr> <tr>content</tr> <tr>content</tr> <tr>content</tr> <tr>content</tr> <tr>content</tr> <tr>content</tr> ..etc --- The fake button is added here <div class="addrow">Add another</div> </tbody> </table> UPD...

Using the new jQuery Position utility script at an FF extension

Hi all, I'm trying to use the following code at my FF extension with no success: $('#duck').position({ of: '#zebra', my: "left top", at: "left top" }); (the Position manual is at http://docs.jquery.com/UI/Position) I also tried: var doc = gBrowser.selectedBrowser.contentDocument; $('#duck', doc).position({ of: $('#z...

Copying onclick event

I have a jQuery function with basically makes an entire table row clickable, but copying a link and duplicating the link in each child cell in the row. In my projects, some of the links may have onclick javascript events, so I need my function to be able to copy those events as well, but I am having trouble doing that. Here's my curren...

javascript pausing consistently. How do I find what is causing it to pause?

I've got a fairly ajax heavy site and I'm trying to tune the performance. I have a function that runs between 20 & 200 times, depending on the user. I'm outputting the time the function takes to execute via console.time in firefox. The function takes about 4-6ms to complete. The strange thing is that on my larger test with 200 or ...

adding to json property that may or may not exist yet

let say i want to do this var dasboard = {}; var page = "index"; $('.check').click(function(){ $(this).toggleClass("active").siblings().slideToggle('slow', function() { dashboard['pages'][page][$(this).closest('li').attr("id")]['show'] = $(this).is(":hidden") ? 'collapsed' : 'expanded'; }); } i get an error s...

Want to load jquery dialog from a different web-page

I'm a bit of a n00b with jquery so this one is probably an RTFM question: I'm writing an application to create a somewhat complex record for my client. Building the record requires doing a couple of server side searches inside a dialog. Right now I have everything framed up in 1 file (asp.net) and it's ok. But I can see as I add th...

jQuery Find element else do nothing ?

Hi Guys, I am trying to use jQuery to basically wrap a bunch of CSS modifications via jQuery but on pages where the #IDs or Classes dont exist I get errors ? Like jQuery(".class").css(random_stuff) is not a function Any ideas what I can do to either "find" the elements and do nothing or ? ...

Copying values of one table to another (how to convert this js function to jQuery)

Hi All, I am stuck with a small problem here.. What i am trying to do is copy description of id's from one table to another. I have writter half of the javascript and can anybody tell me how to convert this function in jquery. I want the description copied from the first table based on the id to the second table. Have done this in jquer...

security deleting a mysql row with jQuery $.post

I want to delete a row in my database and found an example on how to do this with jQuery's $.post() Now I am wondering about security though.. Can someone send a POST request to my delete-row.php script from another website? JS function deleterow(id) { // alert(typeof(id)); // number if (confirm('Are you sure want to delete?'))...

jQuery not working on Popup Window

I am using ASP.Net and jQuery + jQuery UI. Everything works fine with the jQuery on any other page, however when I create a popup window with window.open(...) jQuery seems to no longer function. I have all of the script files included on the Popup's Master page, so am not sure why it won't fire. Any Thoughts? ...

Getting just the filename from a path with Javascript

I have a full path to an image, which I am using jquery to read, in the form $('img.my_image').attr('src') however I just want the filename portion (discarding the path). Are there any built-in functions to do this, or would a regex be the only option? ...

Is there a better way to write this in jQuery?

$(".sectionHeader").click(function() { var row = $(this).parent(); while (row.next().length != 0) { row = row.next(); if (row.children().first().is('th')) return; row.toggle(); } }); ...

Saving temporary file name after uploading file with uplodify

I have this script <?php if (!empty($_FILES)) { $tempFile = $_FILES['Filedata']['tmp_name']; $targetPath = dirname(__FILE__) . $_POST['folder'] . '/'; $pathinfoFile = pathinfo($_FILES['Filedata']['name']); $targetFile = str_replace('//', '/', $targetPath) . uniqid() . '.' . $pathinfoFile['extension']; move_uploaded_file($tem...

Is there a jQuery webscraper out there?

I'm trying to pullout some info from an external site using jQuery and Adobe AIR. Right now I'm using a hidden div and jQuery's load function to load fragments of the external site, once the info is loaded I parse some info with selectors. This is fine but it's kinda dirty and I need to perform this several times (don't want to need many...

jQuery selector not working in IE

sample html: <tr> <td class="hidden tblLnk">8163</td> </tr> <tr> <td class="hidden tblLnk">8163</td> </tr> <tr> <td class="hidden tblLnk">8164</td> </tr> this method should return a unique array of text from rows with a specific td class. { 8163, 8164 } in our sample. works in ffs and chrome but not in ie8 or safari. ...

Strange jQuery $(window).load() behavior in Safari

I have a page being loaded in an <iframe>. Inside the <iframe>, I have a function that patiently waits for the page to load using jQuery's $(window).load() event which is supposed to wait until ALL page content (images, javascript, css, etc.) is loaded before firing. The function then calls back to the page loading the <iframe> using p...

Why is it that on IE7, my javascript file does not work?

No functions get called, and I can't even alert. It is just an external javascript file. However, everything works on Firefox, Chrome and IE8. I am using Django/python backened to serve this file. Is this a known bug from IE7? ...

how to select all childs other than a element

I have a element which contains 3 child. let says <div class="parent"> <div class="firstChild">firstChild</div> SecondChild <ul><li>thrid child</li></ul> </div> In the example I need to select first 2 childs and not the UL. how to do through jquery. ...

openDatabase Hello World - 2

This is a continuation from a previous stackoverflow question. I've renamed some variables so that I can tell what are keywords and what are names that I can control. Q: Why is the deleteRow function not working? <html> <head> <title>html5 openDatabase Hello World</title> <script src="http://www.google.com/jsapi"&gt;&lt;/script&gt; <sc...

Programming image maps

Hello, I am looking for a javascript/jquery solution to build a map with selectable tracks. It will consist of area's map (image) with some river routes for boats that have to be selectable - route have to be made clearer on mouse hover and after user clicks on a route a popup window should emerge. Basically I am just looking for a solut...