Hi.
I'm new to jQuery, in fact any kind of AJAX / JavsScript (although not new to PHP, xHTML and CSS). Anyway I'm trying to achieve a "tooltip-like" effect, where I can hover over a div...the new div fades in above it and then when I exit the div the "tooltip" fades out.
So here's the basic jQuery I've managed to scrap together readin...
I want to double click on a div, but right now it "selects"/highlights a word. How do I make it so that this doesn't happen?
I tried:
$(this).hide().show()
and
$(this).blur()
But it still highlights the word.
...
Hi,
I have this code, it looks alright and is really basic, but i can't make it work:
function checkValid(elem){
var abc = elem.value;
var re = "/[0-9]/";
var match = re.test(abc);
alert(match);
}
It matches 0 and 9, but not 1 to 8, what's wrong here? Thanks.
...
I have a data table that is initially empty and is populated after a particular Javascript call. After the data is inserted into the table, I'd like to center all of the data in one of the columns. I tried specifying this at the initialization step in this way:
dTable = $('#dt').datatable({ 'aoColumns': [ null, null, { "sClass" : "cente...
well, since greasemonkey cant read/write files from local hard disk. I've heard people suggesting Google gears but i've no idea obout gears :(
So, what i've decided is to add a
script type="text/javascript" src="file:///c:/test.js">/script>
Now, this test will use FileSystemObject to read/write file. Since, the "file:///c:/test.js" is...
I am using insertBefore under errorplacement to add validation messages, each one below each other as I want the order of the messages to go from top to bottom.
I am using a hidden input at the very bottom of a parent element in order to supply an element for the insertBefore argument.
Is there a way to insert from the bottom without...
Is these a way i can loop through a PHP array and have the data outputted into a JavaScript array?
For example, the JS script below will not work
var mon_Loop = <?php echo $rowCount_Mon ?>;
var mon_Events = new Array();
for(i = 0; i < mon_Loop; i++)
{
mon_Events[i] = <?php $divMon[i] ?>
}
I Know its because the "i" is not a php...
As the question says, i do not want to use it from the API, and instead combine it on my code, but i can't seem to implement it with the code i have now. the markers do not come out and the search completely disappears if i try implementing with the code.
This is a section of my codings :
http://www.mediafire.com/?0minqxgwzmx
...
Well, first I should probably ask if this is browser dependent.
I've read that if an invalid token is found, but the section of code is valid until that invalid token, a semicolon is inserted before the token if it is preceded by a line break.
However, the common example cited for bugs caused by semicolon insertion is:
return
_a+b;
...
I watched John Resig's Best Practices in JavaScript Library Design presentation; one slide suggested "tweaking" the object constructor so it instantiates itself.
function jQuery(str, con) {
if (window === this) {
return new jQuery(str, con);
}
// ...
}
With that, new jQuery("#foo") becomes jQuery("#foo").
I thoug...
I could write something pretty easily to determine whether the mouse is over a given element, but is there already anything in the jQuery core library (or a plugin I guess) that will tell me whether the current mouse position is over a given element?
...
function addRequest(req) {
try {
request = new XMLHttpRequest();
} catch (e) {
try{
request = new ActiveXObject("Msxml2.XMLHTTP");
}catch(e){
try {
request = new ActiveXObject("Microsoft.XMLHttp");
} catch (e) {
alert("XMLHttpRequest error: " + e);
}
}
}
requ...
Hi,
I have a problem regarding checking the page validation in javascript.
I have a user controls in my aspx page,for example control1, control2, and control3.
For each control I created a validation group, then I tried to use the code below, the problem is, it will always return a false value eventhough the page validation has been sa...
In my application i have lots of divs containing text. All divs have overflow set to hidden so that the user does not see the text if the container is not large enough to contain the writing.
If the user wants to see the hidden text they are supposed to mouse over the "box". The box then expands and shows the text. Sounds simple enough,...
<script language="Javascript">
function test(myObject, flag)
{
if ( (flag) || ((event.keyCode == 59) || (event.which == 59)) || ((event.keyCode == 44) || (event.which == 44)))
{alert(myObject.value);}
}
function closeWin()
{self.close();}
</script>
<form name='test'>
<textarea name='textareaName' co...
why this don´t work:
function rp_insertTable() {
FM_log(3,"rp_insertTable() called");
var farmTable = dom.cn("table");
var ftableBody = dom.cn("tbody");
var i;
var maximize = GM_getValue("Maximize_" + suffixGlobal, 0);
farmTable.className = "FMtbg";
farmTable.id = "farmMachineTable";
farmTable.setAttribute('cellpadding', 2);
fa...
I've seen some sites, that use Google Maps, have the ability to show 'Points of Interest' on the map. Similar to what Google Earth does.
Here's an example of what I'm talking about: http://i.imgur.com/5OCor.jpg
How can I do this? :/
...
Hi ,
How do i convert a danish number to an english format
for example :
8,5 is decimal number representation in danish
and in english it would be 8.5
Now i need to convert 8,5 to 8.5 my current culture is danish and i am trying to convert this in javascript (NOT C#)
Regards,
Francis P.
...
I want to dynamically add search box using Javascript to web-page like shown here :
initially and finally
how can i do this?
...
I have just learned how to use the SQLite database for local storage in a Webkit web browser (e.g. Google Chrome or Apple Safari) using the Javascript API. For example the "Sticky Notes" application.
However, I know that SQLite has a function called sqlite_create_function() that lets you add custom functions to your instance of SQLite...