I have a url that is constructed using get variables like
location.href = this.href +'?type='+ escape($('#type_of_station').html()) + '&count='+ escape($('.number_changer').attr("id").slice(-1));
which gives me a url like the following
http://posnation.com/pre_config/pre_config_step_2.php?type=Grocery&count=2
on the following...
If I have this HTML:
<a id="test" referenceId="test23" href=''>Test</a>
and I want to get the selector based on the referenceId attribute (not the id)
I know I can do this
$('#test'). . ..
but I want to understand if I can do a similar thing but using the referenceId attribute to get the selector.
...
I am new to HighCharts, javascript, and rails. I have a highchart in my rails application. I need to pass the values of the x and y to rails of the point a users clicks on the chart series. I know about the selection event handler but not how to pass data from highcharts to the rails controller. Can someone point me to an example I can l...
It's weird! I was working on my CSS and jquery just stopped working! checked in firefox/chrome and the jquery just stopped working! I have no idea what happen.
I have 2 functions going on. First part animates the header image and the second part generates random numbers when it is click. I pasted my whole code at pastebin.
<!DOCTYPE ...
I'm trying to use the swfupload plugin to upload files. The thing is, I want the user to be able to switch the directory to upload to.
The strange thing is (and maybe this is due to my limited knowledge of jQuery) that it seems like I have the correct directory when checking it with an alert, but still the upload goes to the previously ...
hi all,
i made a little listview widget which uses a table and assigned a function to its rows like:
$("tr",myTable).bind("click",function(){
selectRow($(this));
});
i now would like to apply another function called deleteRow, but only to each row's last cell:
$("td:last-child",myTable).bind("click",function(){
deleteRow($(t...
Hi all,
I'm using a lazyloader plugin for importing .js includes on-demand.
The problem: when my imported script will display an alert-box which has umlauts, the umlauts won't display - but i'm getting a weird replacement-character. I think it must be something with UTF8-encoding but i couldn't find out how to do this for a js-include...
$.get('data/animals.xml', function(xml){
var animals = $.xml2json(xml);
alert(animals.dog[1].name +'/'+ animals.dog[1]);
});
the code below runs very well for http://www.fyneworks.com/jquery/xml-to-json/data/animals.xml
but how can get rate data from http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml
according to code block...
Hello my problem is that whenever i load content to an iframe through javascript and jquery it only loads the first time and then i cannot load anything over it.
the function I use is this:
function loadContent(elementSelector, sourceURL) {
$(""+elementSelector+"").attr('src', sourceURL );
}
and i call it through
<li><span><a hre...
How can i if #UseUsername type checkbox has been checked then toggle #div ?
...
Hi,
Is it possible to get notified when the browser window size changes? This might happen when the user resizes the browser window etc. I need to resize an element in response to size change,
Thanks
...
I'm using the jQuery Cycle plugin to cycle through some images on a webpage.
Each image also has various meta-data (title, description) that is also displayed on the page. Whenever the image changes, the title and description text also change to the title and desc for that image.
<div id='slides'>
<a href="http://whatever.com">...
I need to remove all attributes set on certain elements with jquery, except for a few i want to select manually. Lets say i have an image:
<img hspace="4" border="1" vspace="4" src="someimage.jpg" alt="somealt">
and i want this as result:
<img src="someimage.jpg" alt="somealt">
the only way i could think of is the .removeAttr() eve...
Hi All,
I am trying to use the JqueryUI autocomplete plugin but I am unable to make it work.
I am using Spring MVC at the backend and I am returning JSON response by following this
http://loianegroner.com/2010/02/spring-mvc-and-ajax-with-json/ post that I got from the net.
My problem is, there seem to be some problem in the way the au...
I have this site here
I have an ajax request that calls a php page via this command
var successCallback = function(responseText, textStatus, XMLHttpRequest) {
// rebind your event handlers here
// blue item expand
$('.item-blue .btn-expand').click(function () {
var btn = $(this);
$(this).parent().prev().slideTogg...
My below jQuery is working fine in Safari and Chrome (Latest versions on Mac) but not in Firefox. Any ideas?
$('#contact').click(function()
{
event.preventDefault(event);
$("#contact_box").fadeTo("slow", 0.01, function()
{
$(this).slideUp("slow", function()
{
$(this).remove();
...
I've mostly worked in MVC1. I'm now working with some MVC2 code. I have fields with Strongly Typed Html Helpers like:
<div class="editor-field">
<%: Html.TextBoxFor(model => model.Contract.client_name)%>
<%: Html.ValidationMessageFor(model => model.Contract.client_name) %>
</div>
How do I acce...
I noticed this effect within both Apple's me.com service (the login page, if your user/pass is wrong it does the effect I'm trying to replicate) as well as within WordPress' login.
Its basically a JavaScript implementation of the effect when you type in the wrong username and password on a Mac.
Does anyone know if something like that h...
My wordpress template uses facebox to display portfolio images via ajax requests.
The problem is the images load in different positions depending on the viewers screen size.
My template uses
$('#facebox').css({
top: getPageScroll()[1] + (getPageHeight() / 10),
left: 385.5
}).show()
The facebox site uses
$('#facebox')...
Hi,
Why is it that this code:
$('#tbl tr:odd').css('background-color', '#f6f6f6');
$('#tbl tr:even').css('background-color', '#cccccc');
works fine outside of the plugin in all browsers. While the same code:
$('tr:odd', $this).css('background-color', options.tr_odd_bgcolor);
$('tr:even', $this).css('background-color', options.tr_eve...