Hello guys,
I'm having problem with the contains in jquery. It seems that it only accepts one word. Not a phrase or two words.
Example:
$('#div:contains('Word')'); --> This is okay
$('#div:contains('Just another word')'); --> This will return empty/this will not match.
Have you experience this kind of problem?
Your reply is greatl...
I think the following code will make the question clear.
// My class
var Class = function() { console.log("Constructor"); };
Class.prototype = { method: function() { console.log("Method");} }
// Creating an instance with new
var object1 = new Class();
object1.method();
console.log("New returned", object1);
// How to write a factory wh...
I would like to open a new window with height of 600px and width of 200px, after clicking on a hyperlink.
How can I do that in HTML/Javascript?
Do I use something like window.open? Is it compatible in IE also? Or should I use something in Jquery?
Thanks in advance.
...
My jquery looks like this:
var as = $("input[name=as[]]").serialize();
var bs = $("input[name=bs[]]").serialize();
var cs = $("input[name=cs[]]").serialize();
but it's not serializing the first set at index 0.
...
Hi all,
I was just wondering whether there are any way (libraries, frameworks, tutorials) to do javascript tracking with another script? Basically, i want to track as the user work with the site, which function gets executed with what parameters and so on, as detailed as possible.
thanks a lot!
...
I'm trying to figure out a way to call an html form from C, inject a bit of javascript, then submit the file and check the new URL (header from php) to make sure the form submitted correctly. Got any ideas???
...
hi,
i have a check box when user checked that check box means. i need to make this tr visiable "true" on the page . if again unchecked make tr "invisiable" using javascript or jQuery
intially during the page load i have binded the values for the drop down
-- here i have a dropdown control where values a...
What would be the best way to send an alert message to the user if it requires them to login, but at the same time avoid an ajax call? I might have code like <a href="#" id="vote"> which would trigger an ajax function based on the click. I was thinking I would check on the server side if a user is logged in and replace it with:
<a href="...
Work on ASP.net C# vs 05.
To Preventing Duplicate Record Insertion on Page Refresh. Under the button event i wrote below code
Response.Redirect(Request.Url.ToString(), false);
i also used a javascript alert under this event ,after use the above code alert message is not showing,display message boxes from server-side code?
string mes...
Often times I have elements hooked to added functionality, like:
$('.myfav').autocomplete();
$('.myfav').datepicker();
$('.myfav').click(somefunction);
But when more instances of this class are generated dynamically through some code, the new $('.myfav') are dead and need rewiring, so I do this:
$("#somelink").click(function(){
...
I have used both prototype windows and jquery thickbox windows for creating modal window effects and these are not working only in IE 6. I am passing a parameter at the end of the url, but that parameter passing it not working. If i remove the parameter and give a normal url, its working fine. Is there any other way to pass a parameter t...
All I want is:
select a file
small progress bar (unless it is not simple)
fail/success confirmation on client side
trigger action on server side.
all that without page reloading
Except that, the simpler the better.
Snippet would be most welcome.
...
I have a flash swf file without access to it's source. Can I use only JavaScript to invoke/initiate the action of the flash functions within the swf file?
Or does the swf need active listeners to respond to JavaScript?
...
How can I use RJS to modify CSS elements on a page? I'm looking to do modify the margin of a div to add a "margin-top: 2.8em;"
How can I access this with RJS or should i use something like
page << "document.getElementById('super-wrap').style.margin-top='2.8em;';"
Though this doesn't work.
Thanks
...
I'm trying to use jQuery to replace all occurrences of a particular string that occurs in a certain class. There are multiple classes of this type on the page.
So far I have the following code:
var el = $('div.myclass');
if(el != null && el.html() != null )
{
el.html(el.html().replace(/this/ig, "that"));
}
This doesn't work if t...
I have developed a site using Asp.net C# 3.5 and now I feel that some of the pages are loading reeeaaally slooooow. I now need to start going through the website and try to find out whats making it so slow. But I don't know where to start, whats most likely causing the problem? Where do you usually start when trying to find out what is w...
I am using the below code to select a fields text with JavaScript but it doesn't quite work:
//auto select that fields text for easy COPY
var content = parent.document.getElementById('share_field_<?php echo $id; ?>');
content.focus();
content.select();
Field to select:
//share field
echo '<div class="name" style="display: none" id=...
Hi, somebody can answer me why occur this problem?
With the following code my site only works in Chrome, on IE7/8 and Firefox show me only the background:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<me...
I'm creating an ELIZA-like chatterbot, and I'd like to calibrate it with Omegle, using what the other person type as the input.
If it was a regular HTML page, I could parse it and send back the response to some script, but checking the source code, I've noticed that the entire page is created using Javascript, but obfuscates the entire...
Hi, I'm trying to create a portfolio site where my pieces reside in an XML file. I'd like to store the XML DOM in a JavaScript variable so that I can access it without making a call to the server every time a user clicks to load a new piece.
Right now I have:
$(document).ready( function() {
xml = getXML();
});
function getXML() {
...