Soooooooooooooooo...
I have an IF statement that nowadays will evaluate to true 99.7% of the time, which consists of a check to see if the browser is DOM 1+ capable, and then load a big block of code.
So it's logical to put an "if (true)", and omit the "else" part, but i wonder if the older browsers will still continue to parse the co...
Hello all,
I need script to append text or delete all matched elements if there are any in textarea.
I tried this:
http://pastie.org/789631
What's wrong there? Thanks.
...
I would like to change string encoding from UTF-8 to ISO-8859-2 in Javascript. How can I do it?
I need it because I've designed a widget. User just copies < script > tag from my site and puts it on his. This script creates div and puts into div widget contents with text.
If target website is in UTF-8 encoding - it works fine. But when ...
How to show live preview in a small popup of linked page on mouse over on link ?
like this
http://cssglobe.com/lab/tooltip/03/
but live preview
...
What are cons to use sIFR, in terms of , development time, accessibility, speed and mobile devices?
Some cons Which i know.
Rendering speed of pages will be slow
because of it use JavaScript and
FLASH both
sIFR text will not be shown in Iphone
safari and blackberry. and if it will
be shown in other mobile browsers
then browsing will b...
$("#id").tooltip({
effect: "slide",
tip: '.tooltip'
});
I want to delete the object created by this code.
"flowplayer jquery tools" plugin
This question has an answer described in the bottom of my post!
See the bottom if you don't wanna loose you time
.
----------UPDATE----------
That should be somethi...
Hey,
I pretty new to js and jquery so please bear with me.
I'd like to change the background-position and add 1% on #div1 while clicking on #button1 and take -1% on #div1 while clicking on #button2
How could i achive this in jQuery?
Alse, bonus question:
These are going to get dynamically generated through php. Is it possible to use ...
I've been instantiating subclasses in javascript using
object = new class ()
but I notice some people instantiate using
object.prototype = new class ()
Question: What's the difference? To me it seems like the latter is respecting the inheritance chain more because if class () has a bunch of "this.variable = x" statements, and objec...
Hi,
Simple question (I hope).
I have a page that contains links that when clicked loads up new content into a specified div.
The content that gets loaded (a partial view) contains further links that fire JavaScript code (jQuery).
I have been hooking these links up using jQuery's live system. It has been recommended to me that I wire-up...
Almost everything is in the title ;)
When you create a TreePanel you can add a loader this way:
loader: new Ext.tree.TreeLoader({
dataUrl: '../myurl.php'
});
But how to handle load errors?
For example if the user is not connected I want to display a Login box.
I can't find an example showing how to handle loading errors with Tree...
Using Prototype, anyone know how to load a javascript file using Ajax.Request from another domain? Or if this is possible?
I believe this is possible with jquery, digg do it to load the Facebook API:
jQuery.ajax({type:"GET",
url:"http://static.ak.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php",
cache:true, dataType:"script"});
Sou...
My Joomla! website has been repeatedly hacked into. Someone, somehow, managed to inject the following rubbish into the key php scripts, but I mean not to talk about configuring Joomla. The site is not visited much (at times I fear I might be the only visitor to that site...) and I don't care much to have the site back up and running. I'l...
I hear that Firefox 3.6 adds support for the HTML local file API (Announcement here).
Does this mean that I can access local files from javascript?
Can anyone point me to examples for reading / writing local files?
I would love to be able to read / write simple text files.
Many thanks
...
Hello!
I'm developing a web application that opens a popup using windows.open(..). I need to call a function on the opened window using the handle returned by "window.open", but I'm always getting the error message "addWindow.getMaskElements is not a function", as if it couldn't access the function declared on child window. This is the b...
Hi
I am loading data dynamically by AJAX into a cluetip (http://plugins.learningjquery.com/cluetip/#).
I want to toggle the results from a link like so:
$(document).ready(function() {
$("#calendarLink").live("click",( function() {
$("#result").toggle();
}));
});
For some reason the above will not work. Can you sugg...
I find it very convenient to set arbitary attributes like:
<a stackoverflowId="123">...</a>
And in JavaScript:
var soId = $selectofA.attr('stackoverflowId'); //jQuery
Is it a good practice at all? I've never had a problem with this yet.
...
If jquery is added in globally used header.php across the site then How to stop to load jquery library only for those pages of site which doesn't need actually? If we can't use more than one header.
purpose of question is to not to penalize those page with slow loading which actually don't need.
...
So the script works, but it seems pretty long. I think there may be some shortcuts I could take, maybe use an array? But I'm new at JS, and really new at jQuery.
What it does:
I have a list of ten questions, and I want to take a graphic (plus sign) and toggle it when clicked to a minus sign. It will also reveal the answer by using a sl...
Hi All,
I am creating a small application where there are multiple images displayed and when user clicks on any one of the images it gets bigger and replaces the image that is in middle.
But I am not getting the clicked image.
<HTML>
<HEAD>
<SCRIPT LANGUAGE="text/javascript">
function swapImage(this.id) {
document.write("In SwapImage"...
I'm using Firefox 3.5.7 and within Firebug I'm trying to test the array.reduceRight function, it works for simple arrays but when I try something like that I get a NaN. Why?
>>> var details = [{score : 1}, {score: 2}, {score: 3}];
>>> details
[Object score=1, Object score=2, Object score=3]
>>> details.reduceRight(function(x, y) {return...