hi, i want to highlight all digits in string, i try to cover matched digits with tag but cann't! Here is my code
regexp = /[1-9]/g;
//$("#task").val() it's my input
title = $("#task").val().replace(regexp,'<span class="int">$1</span>');
$1 - i found in google some samples, where $1 must be first matched value, but it's dosn't work!
...
Hi there,
I'm using the jQGrid available at http://www.trirand.com/jqgrid/jqgrid.html and I can't find a way to disable its expand/collapse button on the top right of the header. Anyone know if there's an option to do that?
I'd linke to remove the thing circled in red:
...
Here is a small blurb from a JavaScript function I have.
ddl.options[i].selected = true;
document.forms[0].submit();
A link is clicked, which changes a dropdown value and then submits a form. The problem is that in IE6/7/8, it seems the form is submitted before the dropdown selection is made. The weird part is that this only happens...
im so tired of not finding good tutorials on long polling/streaming comet techniques with jquery. what is wrong with the comet community. a lot of people wanna use this but there are no good tutorials about it.
why so slow?
...
Can I use a JQuery Dialog to open up an external web page, and if so - how?
Essentially, I want to replicate the abilities of LightWindow using JQuery (LightWindow is based on scriptalous).
www.stickmanlabs.com/lightwindow/index.html
Ideally, I want to use something that is apart of the JQuery core. If it need to be a JQuery plug-in, ...
Hi everyone,
I am using jquery to implement event delegation on my page. I define a click handler for the top level element, but only want to do something "custom" if the click fell on an element of certain class:
$("#myDivWithManyLinks").click(function(e){
var target = $(e.target);
if (target.hasClass('myClass123')
{
/...
I'm learning jQuery and this is my code so far:
<script type="text/javascript">
$(document).ready(function(){
$('#login').click(function(){
$('#login-box').fadeIn('fast');
});
});
</script>
It works, when you click the login button the DIV called login-box shows on the page. What I wanted to do was if the login button ...
I need to style some text within a pre-element. For that, I use an inline span-element like this:
<pre>
some text <span style="background-color:#ddd;">and some text
with a different background</span> and some more text
</pre>
Then the html is rendered, the span-elements background is only changed underneath the text.
Is it somehow p...
My understanding is that with LGPL, can I link and use an LGPL library for commercial use, as long as I don't copy code?
That make sense for programs you compile to binary, but what about JavaScript?
I want to use the Greybox plugin for JQuery in my commercial website but don't know how to do that legally since it's LGPL.
...
I'm not sure the correct term for this. But I want to write a function that accepts another function and execute it.
For eg.
function test(data, aFunc) {
var newData = data + " Shawn";
aFunc.call(newData);
}
test("hello", function(data){
alert(data);
});
Data is supposed to contain "hello Shawn" string. Help me rewrite this...
Hi there,
Is there anyway to load content body by click on its title ajaxly in the same page?
should I make changes in template or use an extra extension?
also just can use javascript plugins and not changing them unless they have a specific manual for the certain plugin.
Regards...
...
I'm sure I've seen some examples of this in jquery. But for me, the following code does not work. The firebug debugger tells me that: 'Location is undefined'. Could you tell me if this is possible?
function ResolveGeoCode() {
var Location;
Location.Ad1 = "Hello ";
Location.Ad2 = "World";
return Location;
}
var loc = Re...
I'm trying to convert a two-dimensional array to a string in order to store it in the localStorage array. However, there is something wrong with this code I cannot identify:
for(x in array) {
if(array[x] instanceof Array) {
array[x] = array[x].join("`");
}
}
var string = array.join("@");
localStorage[key] = string;
Doe...
Hello,
I am using electronic Signature Pad in my ASP.net application. I want to popup a alert message if the epad is not connected.
function isePad() {
var epad;
epad = window.document.esCapture1.ConnectedDevice;
alert(epad);
if (epad == '' ) {
alert('Sorry epad is not Conn...
This question is similar to the one i asked here. But its related because I want to achieve the same effect. I want the users to be restricted to only accessing other pages on the site through the main page. The first page contains a frame for navigation and then a frame for content of the page they navigate to. I want it to be setup so ...
I'm using the following code to add rows with text fields dynamically at the touch of a button. The issue I have is that the text fields that are being created in these rows are not the size I want. Is there a way to specify the length of a text field in this situation?
function addNewRow()
{
var iX = document.getElementById("txtI...
A big thanks to anybody that can provide some help!
If you go to http://gisnet2.cstx.gov/gisweb/base/baseBACKUP-11-10.HTM you'll find a map application written in javascript.
If you click on the Identify tool in the floating window on the right, then click on the map, an info window will come up. Click around on the map (there's som...
Hi,
I asked a question about regular expression in PHP (which got answered), I need help with same regular expression in javascript, here is the link to previous question. http://stackoverflow.com/questions/2015320/need-help-with-writing-regular-expression
Again I am not looking to get JSON.parse and get the json object, I need to fin...
when i use comet iframe i just send script tags from backend php file to front end and javascript is displaying it.
can someone explain briefly where a comet server comes up in the picture and how the communication will be between frontend (javascript), backend (php) and the comet server.
cause i read that if you are going to let a lot...
I'm trying to use jQuery, and everything has been great, until now, when I'm trying to render a partial and append it to a div. Here is how I have it set up:
I have an action that responds to js:
def index
@objects = Object.find(:all)
respond_to do |format|
format.js
end
end
And a template called index.js.erb with some jav...