jquery

jquery not showing up in IE?

I am pulling info from an XML file and the div class="long" works great but the anchor doesn't work or doesn't show up in IE. It works in all other browsers but NOT IE? any thoughts? $(this).find('desc').each(function() { var url = $(this).find('url').text(); var long = $(this).find('long').text(); $('<div class="lon...

What's the recommended way to create an HTML elemnt and bind a listener to it using jQuery?

At the moment I achieve this using something like this: var myElem = "<tr id='tr-1'><td>content</td></tr>"; $("#myTable").append(myElem); $("#tr-1").click(function() { // blah blah }); Traditionally, when I wasn't using jQuery, I used to do something like this: var myElem = document.createElement(...); var myTable = document.getEle...

What's wrong with this code?

$('#PbtnSubmit').click(function() { if ($("#PricingEditExceptions input:checkbox:checked").length > 0) { var chec = $('#PricingEditExceptions input[type=checkbox]:checked'); var PMstrIDs = chec.map(function() { return $(this).val(); }).get().join(","); alert(PMstrIDs); $('#1_except...

jQuery Tablesorter - column not sorting alphabetically

I'm not sure what's going wrong here. This is the page: http://www.utexas.edu/ssw/cswr/projects/project-list/ The first column sorts, but it isn't returning data in the correct order (alphabetical). The table itself is being generated by a custom PHP function that pulls info from a WordPress database. I thought that might be the issue,...

jquery.clone() and ASP.NET Forms

So I have a page where I would like to be able to add multiple, dynamic users to a record in a database. Here's the rough start page: <div id="records"> <div id="userRecord"> Name: <asp:TextBox runat="server" ID="objNameTextBox"></asp:TextBox> <br /> Phone Number: <asp:TextBox runat="server" ID="objPh...

jQuery if not exist

This means "if exist" if($.cookie("movies_list")) { // do something } How to write "if not exist" without changing the structure? ...

Jquery .html replacer just empties my selector, what's wrong!?

$("#autoNames").html(function (index, html) { var begin = "<script language='javascript' type='text/javascript'> var names = ["; var end = String('];' + '<' + '/' + 'script' + '>'); var result = begin.concat(jsonService, end); ...

How to hide div serverside by reading cookie

I am using following a tutorial from here: http://www.shopdev.co.uk/blog/cookies-with-jquery-designing-collapsible-layouts/ This is the script I use: <script type="text/javascript" language="javascript"> $(function() { // SETUP: // When the info banner is clicked: $('#setup').click(f...

jQuery Autocomplete plugin not working with jQuery 1.4.1

I've been using the JQuery Autocomplete plugin with JQuery version 1.3.2, and it has been working great. I recently updated JQuery in my project to version 1.4.2, and the Autocomplete plugin is now broken. The JQuery code to add items to a textbox on my web page doesn't seem to be getting called at all. Does anyone know if the JQuery ...

jQuery cookie control

How to create cookie, which will work on all pages over choosen site? Using cookie plugin. Code must add cookie "movie_check" with value "no", which can be used over all pages on site "www.site.com" (were script is implemented). Expires after 365 days. Tryed this (doesnt work): $.cookie("movie_check", "no", {expires: 365, domain: 'ww...

Hide All But First Matching Element

I am using jquery to sort through multiple paragraphs. Currently I have it set to show only paragraphs that start with a current letter. But now, I would like to consolidate further. If the text between the paragraph tags has multiple instances, I would like all but the first hidden. This is what I have so far but, it is not working....

using jquery (json) to get ajax database entries in wordpress - PHP not working

I'm writing a plugin for my wordpress site and am having trouble understanding the jquery ajax requests. In a nutshell, I am trying to get some user meta data loaded when the page loads. So in my javascript file I have a line: $.getJSON("http://mysite.co.uk/wp-content/plugins/myplugin/ajax/ajax.php?action=test", function(json) { // do...

How to change the header height in jQuery grid?

Hello Friends, I have a jquery grid,, with columns 5..but my column name is too large so defined somethign like this in my jquery grid.. Informatoin about <br/> customers bioData In my jquery column I am seeing Information about I am not able to see Customers BioData.. how to set the header height? thanks ...

jQuery cut link

Here is html: <a href="http://site.com/any/different/folders/picture_name.jpg"&gt;Go and win</a> <a href="http://site.com/not/similar/links/some_other_name.png"&gt;Go and win</a> How to cut all the data from a href, except picture_name.jpg? There can be any length of the link, we must take just the value from last / to last " And any...

jquery XML .html() instead of .text() is not displaying?

I can't seem to figure out this problem. I am trying to get xml to render html tags. The problem I am having using .text() will display but not recognize any html tags. If I use .html() or just call var long2 = $(this).find('long'); nothing will show up in Safari or IE. I have xml paragraph I have text in here that needs bold tag...

Triggering click events from within a FF sandbox

I am trying to trigger a click event on an element on a page from within a Firefox sandbox. I have tried using jQuery's .click() as well as doing: var evt = document.createEvent("HTMLEvents"); evt.initEvent("click", true, false ); toClick[0].dispatchEvent(evt); Has anyone been able to trigger a click event on a page in the browser thr...

How to drag and scroll in a div with jQuery

Hey guys, I've been looking around for some time now, but I can't find a way to combine these elements: I want a 100% width div, with 1 row of elements. I need to scroll through this div, just like: http://jqueryfordesigners.com/demo/scrollable-timelines.html So with a hidden overflow and such. But now I want some sort of smooth ea...

Django/jQuery - read file and pass to browser as file download prompt

I've previously asked a question regarding passing files to the browser so a user receives a download prompt. However these files were really just strings creatd at the end of a function and it was simple to pass them to an iframe's src attribute for the desired effect. Now I have a more ambitious requirement, I need to pass pre existi...

manipulate content inserted by ajax, without using the callback

I am using ajax to insert a series of informational blocks via a loop. The blocks each have a title, and long description in them that is hidden by default. They function like an accordion, only showing one description at a time amongst all of the blocks. The problem is opening the description on the first block. I would REALLY like t...

jQuery cute scroll

I am using scrollTo plugin, the excellent stuff. http://plugins.jquery.com/project/ScrollTo THe main idea - it must start to scroll the page when we hover .top-scroll block (mouseover) and stop when we hover it out (mouseleave). Tryed this: $(".top-scroll").hover(function(){ $("body").scrollTo($(".top-corner"), 2000); },function()...