I have a problem involving jQuery drop downs. Basically the button which reveals the drop down dissapears upon revealing the drop down. Here is the code
The HTML included in the navigation
<div id="header">
<div id="navHolder">
<ul style="list-style: none;">
<li><a href="#" class="navBtn">Travel Blog</a></li>
<...
I have a block of jquery / javascript code that sets the left margin of an image depending on the browser width.
I do some sums to calculate the required left margin and it goes in var $diff.
This code works fine:
$('#background-wrapper>img').attr('alt',$diff);
which demonstrates that the sums are all working fine as the image ends ...
Hi there
I am trying to replicate the sortable portals design as seen on the bbc home page, using Jquery.
I have used the code from the jQuery ui site to recreate the drag and drop portlets, as shown here.
$(function() {
$(".column").sortable({
connectWith: '.column'
});
$(".column").disableSelection();
});
H...
Hi all,
I have a div with a height of 35 pixels and a hidden div with a height of 200 pixels. I have a jQuery function which hides the smaller div and shows the larger div when clicked. This all works fine.
The problem is, when the larger appears it is behind an image which is below it. I have set the z-index of all affected object to...
--In the variable line below I declared a variable (xwid) as 690. But when I try the code by using the variable of $xwid, the width never updates. Any ideas?
$xwid=690; // my var
// my code
$('.iframe-link').html( '<iframe src="reasons.html" frameborder="0" width=$xwid height="305" scrolling="auto">
...
I would like to know what are the best practices in using Javascript in ASP.NET in a pre-AJAX and pre-jQuery era. What I meant by pre-era is not the time before AJAX/jQuery was created, but rather the time before it is popularized and widely adopted (by a significantly large number of programmers).
i.e. Is it good thing to store the sc...
Hi,
I'm wondering when the jQuery selector returns multiple elements and I do a "slideDown" for example on all those element...
$('.allthisclasss').slideDown();
Is there a single loop of code that moves all objects down in synch or if jQuery treats all objects separately and they each have a thread of execution to move themselves?
My...
Hi, I'm trying to loop through a table to create a csv string. I do some sorting through jquery on the table so I want to be able to get the resulting sorted data. Problem is I want to identify each new row, so add a \n or something after the last td of every row. The code below just isnt right. Any pointers appreciated.
function GetCsv...
I have an app that uses ajax (jQuery) quite extensively and when sending JSON to my web service I always "escape" any strings to make sure there is not any nastiness in there. To decode it at the other end (in my c# code) I have been using HttpUtility.URLDecode() and this has been working a treat until it came to the £ symbol, it just do...
I would like to reset the values of one set of form fields which belongs to the same class. for example,
<input type="checkbox" name"abc" id="abc" class="class1">
<input type="text" name"abc1" id="abc1" class="class1">
<input type="checkbox" name"abc2" id="abc2" class="class1">
onclick of another checkbox, I would like to reset the ab...
I have finally got a JQuery lightbox solution to work in IE and with AJAX form posts with one exception. Here's what I'm trying to do:
User clicks checkboxes to select users to send message to. (index.haml)
User clicks submit, which triggers an AJAX post (invites_controller.rb)
respond_to js opens a hidden div, generated from a partia...
I get my data from the asp.net web service and I was wondering whether there is a way to pass on that data (in json formar straight from the web service) into the DataTables object. I would like to do something like:
$(document).ready(function() {
$('#example').dataTable( {
"bProcessing": true,
"bServerSide": true,
...
I have a table where I display some information for a user to "approve" or "deny" certain projects. I created two images: a cross sign for denials, and a check sign for approvals. On each click, I am adding the unique id to its respective hidden form field (rejectedProjs and approvedProjs). In addition, if a user clicked on "deny" then I...
I have a DOM element that is generated with js, and therefore when i want to bind a click event listener i need to use $(generatedEl).live("click", fn...) (is there a different way?)
here is the code i am using:
$(".toggleView").live("click", function(){
if(isTrunced){
$(this).htm...
I'm able to post a complex object to an ASP.NET MVC controller with jQuery, as long as I modify the output of $.param() like this: "Column[0][Name]" -> "Column[0].Name"
However, this only works if the data is bound to an array-type property on the server (Columns1 in the example below). A collection type like IEnumerable or the EntityS...
Hey guys,
I am using the AjaxUpload plugin with jQuery, and everything is working fine for the most part, but I have to click my button twice to get it to execute. I'm guessing this is a scope issue... or(?) still learning...
Here is my code:
$(".upload-button").live("click", function(event) {
event.preventDefault();
...
Hello,
I'm designing a web app, and need a way to pull strings out of a MySQL database and display them as drop down suggestions as the user types data in a form.
For example if the user has entered: "stac" the app should search the DB and provide suggestions like: "stack" "stackoverflow". I'm looking for something simalar to how a l...
I was wondering how to return the position of a list element with a class of 'currentTab' in the following unordered list:
<ul id="coverTabs">
<li class="currentTab"><a href="#">Individual</a></li>
<li><a href="#">Couple</a></li>
<li><a href="#">Family</a></li>
<li><a href="#">Single parent family</a></li>
</ul>
The ...
Hey everyone,
I'm having a weird issue with Firefox and loading of a PDF inside an iframe. Here is what the pages does.
- Select an item from a drop down list
- Load PDF inside a iframe based on the selection.
All other browsers work fine except FF. One a select an item to load the status in the lower left corner says 'STOPPED'. I fi...
I'm looking for a super simple jQuery extension. Basically I need to use some events that jQuery does not explicitly support. These events are the iPhone touch events like ontouchstart, ontouchend, and ontouchmove.
I have it working via this:
// Sucks
$('.clickable').each(function() {
this.ontouchstart = function(event) {
//do ...