jquery

How to Extract the Current URL and ID in jQuery?

How would I go about getting the current URL using jquery, or more specifically, getting an ID on the end of it? For example, I have product.php#tab-2. What I want to get from it is just the '#tab-2' part. I have tried 'window.location.pathname' but that will only return '/product.php' Thanks ...

How do I shorten this load jQuery?

I'm pretty good with jQuery but when I get to stuff like this I need a little help. So I want to shorten this code: $(function() { $('#experience_nav').click(function() { $('#contentWrap').load('files.html #content_experience', function() { $(this).hide().fadeIn(); $('#content_experience').siblings().fadeOut(); ...

Can't jqeditable after appent an element for it.

Hi! I wrote a script, to make a new element to my SQL db and my website. If the post is good, i will get back the ID of the post, so i can make a DIV box like the other DIVs. The problem is, I can inline edit the texts in all of the DIVs but NOT in the created one. ajaxRequest.onreadystatechange = function(){ if(ajaxRequest.readyS...

jQuery Right Mouse click context-menu plugins

Hi, I realise there are alot out there but can people please recommend decent and lightweight jQuery Right Mouse click context-menu plugins. URLs/demos would be much appreciated. Thanks. ...

Use javascript/jquery to append URL?

Is it possible to use javascript/jquery to append something on the end of a url when a link is clicked? For example, I have 5 tabs on a page (product.php), when I click a tab, then that tab opens. What I want to do is have the URL change to product.php#tab-3 (or whichever number tab is clicked) when you click on it. The reason I am do...

problem iframe IE8

we have iframe <iframe src="m1.html"> </iframe> <div style"display:none"><p>contents</p> <img src="url-session-data" /> <div> through jquery ,we are loading div contents to iframe , problem is image is not loading in IE8 but working fine in IE6,FF etc any suggestion? Note: url-session-data is dynamic loading ...

jQuery clean slideToggle for many elements at once

I am using a slideToggle technique to show and hide 100+ DIVs full of information in my application. I have "Show All" and "Hide All" buttons and I'd like for them to have the slideToggle animation as well (instead of just showing and hiding all). However on IE6, the slideToggle runs really slow when being applied to each element. Does ...

Twitter like Form Submission using Ajax or Jquery

I need a simple example of form submission very similar to Twitter. How you type in a comment and click update and without the whole page refreshing, the comment gets added below on top of the rest of the comments. I would prefer something in Jquery as my PHP project is already integrated with it. ...

Problem with jQuery append in ie7

Hi guys I am having a very strange problem in ie with the append function. Basicly i retrieve data from an ajax call in xml. Parse the xml into variables then using the each function append to a specific div. Works fine in firefox had to do a work around to get the file to parse in ie. Please note 'ALL WORKS' fine my variables etc. all h...

remotely load and rotate images in jQuery

There are plenty of gallery plugins out there that rotate images but they all seem to use a list of images on a page so initially they all have to be downloaded. if this happens at the top of a page then it can slow down load time a lot especially if the images are large or there are a lot of them. I am looking to rotate images based ...

how to select input field in listed form with jquery

Hi, I got several forms listed through a loop at one page such like this: (extract) if(mysql_num_rows($r)>0): while($row = mysql_fetch_assoc($r)): ?> <form id="myForm" action="save_fb.php" method="post"> Title: <input type="text" name="fb_title" value="<?php echo $row['fb_title']; ?>" /><br> <a href="javas...

Ajax Toolkit in Control Jquery

<script language="javascript" type="text/javascript"> $(document).ready(function() { $("#TextBox1").click(function() { alert("bla bla bla bla bla") }); }); </script> <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"> </asp:ToolkitScriptManager> <asp:TabContainer runat=...

Give the JavaScript the button's id.

In my JavaScript code, I have to make a line like this (I use smarty template engine, that is the literal stuff). <script language="javascript" type="text/javascript"> function ajaxTextKill() { // ...etc. ajaxRequest.open("GET", "functions.php?action=kill{/literal}&id="+IWANTMYIDHERE+"&p={$smarty.get.page}&c={$smarty...

JQuery to add item to Asp.Net PlaceHolder control

It looks to me that the ASP.Net PlaceHolder control doesn't emit any HTML, and therefore can't be used by clientside javascript or JQuery to add items to the PlaceHolder. Does anyone know of a way around this limitation, or of an ASP.Net control that can be used to dynamically add items by client side code? ...

JsonFilter unit tests work, but real scenario doesn't - content type appears wrong - what's going on!?

I have used some JsonFilter ActionResultAttribute which uses newtonsoft.Json json converter to convert the json in the request into a real object. This appears to work fine some some basic parameters, but isn't working for more complex, so i wrote a UT for it (yeah I should TDD, but prototypes always come first...). The attribute class...

Using Ajax with dynamic Fields

Hi Guys, Im working on a project currently and really using javascript, Jquery / AJAX heavily for the first time and have run into an issue. Ill do my best to explain it but an example which has all the key parts can be found here http://mail.diskbank.com.au:8080/kieran/AJAX-test.php Basically i have a quote form where people can dyn...

Download estimator for web site

I would like to calculate/estimate the amount of time file will take for download. Is there any way using which this can be achieved using JavaScipt or something else? What level of accuricy can be achieved ? (+evs / -evs ) I have tries this by downloading small image and then performing maths to get the bandwidth and time needed. But ...

jquery input mask past dates

Using meioMAsk plugin is there any way to set up a mask so it will accept valid US date up to today's date $(#txtContactDate).setMask('us-date'); You can set a date filterusing pre-defined mask 'us-date' but it allows future dates and also allows some invalid dates, like 02/31/2010. Thanks. ...

combining jquery lava lamp menu and draggables with content slider

Hi, I'm building a site that relies heavily on jquery. I have three scripts I'm trying to use on the same page: a lavalamp-style menu, an area with draggable divs, and a content slider containing both elements that will allow me to scroll between content areas. I can not get the content slider to function correctly. Links will take me ...

Jquery dynamic image resizing not taking correct image dimentions

For some reason while clicking around this gallery i'm creating, the dimensions that get assigned to the CSS don't always take when a new image gets loaded in the .product-image container. I think it's caused by assigning css attributes while an image is still loading, as it only seems to happen with larger images. Once ".more-views a" ...