jquery

Any hosted versions of jQuery that have the 'Access-Control-Allow-Origin: *' header set?

I have been working with jQuery recently and ran into a problem where I couldn't include it in a userscript because XmlHttpRequest uses the same origin policy. After further testing I found that most browsers also support the Cross-Origin Resource Sharing access control defined by W3C as a workaround for issues with same origin policy. I...

Chaining CSS classes in IE6 - Trying to find a jQuery solution?

tl;dr = "Anyone know how to apply chained classes for IE6 using jQuery or similar?" Right, perhaps I ask the impossible? I consider myself fairly new to Javscript and jQuery, but that being said, I have written some fairly complex code recently so I am definitely getting there... however I am now possed with a rather interesting issue ...

jQuery add() function and the context of jQuery objects

Given the following HTML example... <div id='div1'>div one</div> <div id='div2'>div two</div> ...I found that the following jQuery code... $('#div1').click(function() { var $d = $(this); // Using 'this' instead of '#div1' $d.add('#div2').remove(); }); ...would not add #div2 to the set referenced by $d, but this code......

Large PHP enable web form - around 75 field - how best to send email with all fields?

Have created simple Ajax enabled contact forms before that have around 12 fields - worked fine.... Now working on a PHP enabled web page for job applications that has around 100 fields. The ajax technique I was using was to send request via querystrings (&val1=test;&val2=test2 and etc ...) That is not going to scale very well with lar...

how to change format 1 to format 2 .

when i store my kml string to databse,i be this : 2. <?xml version="1.0" encoding="UTF-8"?> <kml xmlns="http://www.opengis.net/kml/2.2"&gt; <Placemark> <name>Simple placemark</name> <description>Attached to the ground. Intelligently places itself at the height of the underlying terrain.</description> <Point> ...

getting the direct content of an html element encapsulated in a jquery object

I have an piece of html in a jquery object. When I say $(this).html() I get: <span class="value">4</span><span class="type">teaspoons</span>butter I want to get only the piece of text from this html segment that is not in the spans. in this example, it is butter. How do I get that? Thanks! ...

jQuery UI draggable() and resizable()

I want to write the draggable() and resizable() code in such a way that all future elements with a particular class will inherit those plugins without calling them again. $('div.resizeMe').resizable({ containment: 'parent', minWidth: 400, minHeight: 200 }) When the above code is executed, all divs with resizeMe class inherits the resi...

How can I add styles to dynamically added table cells?

In my program I have a table that, when loaded, has jQuery add some styles/classes to the table cells and table headers. Everything works fine until rows are added via functionality on the rest of the page. Instead of adding the classes to the table cell during addition, is it possible to "listen" or fire some event that checks to see ...

Is there any method to escape '&gt;' to '>' in JavaScript?

i want to escape some HTML in JavaScript. How can I do that? ...

dynamic html "more information" callout / annotation (jquery? ajax control toolkit?)

Hola, I have an app i'm building in c#, and i'd like to have the ability to have a user click a "more information" icon next to a field, which will then show a callout with some blurb about why the field contains what it does. ideally it'd look a lot like the ValidatorCallout, but instead of being shown as a result of validation, it'll ...

Retrieve click() handler in jQuery for later use

I'm using the jQuery tablesorter plugin to sort a table, which assigns .click() handlers to the <th>s in the table. Since my table has alternating colors for each column, I've built a simple fix_table_colors(identifier) function that does as it should when I call it manually using Firebug. I would like, however, to have that automatica...

jQuery: How can I check if a block in my document is inside the viewport or outside of it?

I am basically trying to trigger a function if the footer is inside the viewport. How can I check whether the footer is currently visible in the viewport? I assume I will have to put it into the $(window).scroll() event so that the listener becomes true once the footer becomes visible but what the function should be I just can't figure...

Autocomplete with Next/Previous button

Hi All, I am creating a autocomplete textbox for a application for touch screen device jquery autocomlete. The scrollbar in the autocomplete is not so user friendly so i was suppose to give another option. Is it possible to include Next/Prev button inside autocomplete? or Is there any other good option for this issue? Geetha. ...

jQuery add Share Icon script

Hello: I'm trying to add via jQuery the share icon [1]. Unfortunately I can't seem to do this as jQuery appears to escape the script code and I can't seem to get it to work with .text() or .html(). Has anyone gotten this, or something similar, working? The code I'm trying is: var enc = $('<div/>') .text('<script type="te...

How to write OnClick="return Foo()" in jquery

How do I write OnClick="return Foo()" in jquery to prevent the button from submitting while the function is not yet finished. TY ...

jquery :last missing multiple classes

I have an unordered list, and am using jquery to find the last ul and apply a class. jQuery("ul.class1:last").addClass("lastUi"); The html is as follows: <ul class="class1"></ul> <ul class="class1"></ul> This is working fine, however it has now changed in that another class is being added to the list so the html looks like: <ul cl...

SVG animation along path with Raphael

I have a rather interesting issue with SVG animation. I am animating along a circular path using Raphael obj = canvas.circle(x, y, size); path = canvas.circlePath(x, y, radius); path = canvas.path(path); //generate path from path value string obj.animateAlong(path, rate, false); The circlePath method is one I have cre...

How to preload images using jquery for carousel?

I used jquery stepcarousel plugin and it works fine... But how to preload images that is used by the plugin... I am using this, <div id="mygallery" class="stepcarousel"> <div class="belt"> <div class="panel"> <img src="Images/img1.jpg" /> </div> <div class="panel"> <img src="Im...

Clickable LI overrules links within the LI

Hello guys and gals... I have a LI with some information, including some links. I would like jQuery to make the LI clickable, but also remain the links in the LI. The Clickable part works. I just need the links within to work as well. NOTE: They work if you right click and choose "Open in new tab". HTML <ul id="onskeliste"> <li u...

How to get an Array from jQuery, multiple <input>s with the same ID

I have a form where users can add input fields with jQuery. <input type="text" id="task" name="task[]" /> After submitting the form I get an array in PHP. I want to handle this with the $.ajax() but I have no idea how to turn my <input>s to an array in jQuery. Thanks in advance. ...