I have a function called "Colorbox" (jQuery plugin) that takes a number of parameters like so:
$(this).colorbox({
width : "500px",
height : "500px"
});
I have several different types of "this", though, each with their own properties. Like so:
var Type = {
video: {
width : "500px",
height : "500px"
},
gallery: {
...
Well, I admit: I've extensively used jQuery.attr to store custom data in DOM elements in many, many scripts. I'm wondering if convert all my script to use jQuery.data instead of jQuery.attr. As far as I understand, the advantages of jQuery.data are:
produce neat and valid HTML code
can store any type of data (objects, array,...) on ele...
In windows, when an application is minimised the OS frees up memory associated with application by placing the data within a page file. Other garbage collection may also execute.
In the case of internet explorer running my javascript app I find that if the memory usage starts at 60mb then minimising the browser reduces the memory to 17...
One of my coworkers needs a piece of data from a 3rd party website. That data gets posted to a site each morning at an arbitrary time. He has to sit there and click refresh in his browser every 10 seconds until it shows up. He asked me if I could write something to make that page auto refresh every X seconds so he can leave it open on o...
There are many topics related to my question and i have been through most of them, but i haven't got it right. The closest post to my question is the following:
http://stackoverflow.com/questions/1042072/how-to-call-functions-that-are-nested-inside-a-jquery-plugin
Below is the jquery plugin i am using. On resize, the element sizes are ...
I want to attach and event to the Jeditable Input box as soon as it gets created. There is an "onblur" but no onfocus as far as I can tell. Does anyone know a fast approach to do this?
...
I'm trying to modify the code from this script. Basically I'm trying to get the script to send the browser to another page rather than display the results in a div.
This is the code in question:
<script type="text/javascript">
function openOneSlot() {
SpinningWheel.addSlot({1: 'First', 2: 'Second'});
SpinningWheel.setCancelAction(canc...
You can select a part of a web page with the mouse.
I know that I can get the currently selected text but how can I get the DOM element which contains the start or end of the current selection?
...
I've experimented with Simile's exhibit and see the usefulness of the graphical display via a prototype implementation on machines which have access to the internet. We have need to migrate the prototype from the open internet to a closed intranet, where only internal servers are available.
The timeline seems feasible, but maps depende...
I tried to slide in and out a DIV with the toggle function of jQuery but the result is always jumpy at the start and/or end of the animation. Here's the js code that I use:
$(document).ready(function(){
$('#link1').click(
function() {
$('#note_1').parent().slideToggle(5000);
}
);
And the HTML:
<div cla...
Looking for a Lightbox which is jQuery based, compatible with IEr (and naturally all major browsers), lightweight and easy to customize (like border thickness and color) and be used for submitting forms. The form is in the lightbox. Planning to use with ASP.NET (not that it matters but a plus if it works well with it).
Please don't post...
In the HTML head section:
<script type="text/javascript" src="Scripts/editScripts.js"></script>
Just above the </body> tag(closing tag, bottom of the html page). Also: this is the old code, this is how it was when it was not working:
<script type="text/javascript">if(document.getElementById)initialize();loadEvents();</script>
<...
Hi,
I have a contact form on my site that operates with a rails remote_form_for. After someone submits the form, the html in that div gets replaced with a success message instead of the entire page reloading (the reasons for doing this aren't too relevant...but basically this contact form is way below the fold and I don't want the page...
So im trying to perform a basic validation to check if a field is empty. I want to do it in a loop..
<input type="text" size="25" name="q170_Name" class="text" value="" id="q170" maxlength="100" maxsize="100" />
function validateMe() {
var dropdowns = ["q170","q172","q173","q174","q175","q176","q177"];
var totalz = (dropdowns.length);...
I have a very unique situation.
We use a Cisco Web VPN (don't know the exact name) here at work.
If I try to use the web pages I've developed, the javascript is broken.
I have tracked it down to this:
When using the Cisco Web VPN it will actually rewrite some of the HTML/JavaScript code.
For instance, at the very beginning of the s...
Is it possible to create a custom confirmation box for the onbeforeunload event in a browser? I tried but then I get 2 confirmation boxes (one from me which is nothing more than return confirm... and then the standard one from the browser).
At the moment my code looks like:
var inputChanged = false;
$(window).load(function() {
win...
I currently use Chrome/Firefox for my web development.
Is there a plugin, or am I just another way, where you can view the HTML source AFTER all jQuery plug-ins have run? I just want to see what and how jQuery modified the HTML?
...
I have an AJAX modalpopup which I would like to launch when a page loads. Currently, I have the following in my Page_Load:
HtmlGenericControl myBody = (HtmlGenericControl)Master.FindControl("thebody");
myBody.Attributes.Add("onload", "openMP();")
This successfully injects the onload function (I can tell by looking at the source). Ho...
Looking for an example or sample app of an ASP.NET page with a DataGridView with records. Each record has a hyperlink and clicking on a link, instead of showing the details of the record in the same page, opens a lightbox on top with a form showing the details.
...
Recently I ran some of my javascript code through Crockford's JSLint, and it gave the following error:
Problem at line 1 character 1: Missing
"use strict" statement.
Doing some searching, I realized that some people add "use strict"; into their javascript code. And once I added the statement, the error stopped appearing. Unfort...