I want to change css class of an element on certain event in jquery.
eg.
focusin: function()
{
if(this.val()=="First Name")
$(this).find("span ").css
}
$(this).find("span which contains _set").class= mycssclass here I want to change the CSS class of span element whose id contains "_set" as a part of substring in class name and also want to change the text i.e. InnerHtml property of javascript of this span element
I have a ASP.NET solution in Visual Studio 2008 and I added a file identical to http://plugins.jquery.com/files/jquery.cookie.js.txt named jquery.cookie.js in a subfolder of my project containing other javascript files and Visual Studio is treating it as a C# file, giving me errors like CS1012: Too many characters in character literal and Semicolon after method or accesssor block is not valid.
Why?
I have an XML document here that is served with a corresponding XSL file. The transformation is left to be executed client-side, without JavaScript.
This works fine in IE (shock horror), but in Google Chrome, just displays the document's text nodes.
I know that it is possible to do client-side XSL in Chrome, as I have seen examples of it, but I am yet to be able to replicate this success myself
What am I doing wrong?
How to truncate sthe string to 75 characters only in python
This is how it was done in javascript
var data="saddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddsaddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddsadddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd"
var info = (data.length > 75) ? data.substring[0,75] + '..' : data;
I am trying to build a website consist of three pages but with a contact form using ASP.NET. Now that I have build the layout and all xhtml/css and some javascript and next I wan to convert it so that it's dynamic and can send email.
Do I need to convert it using Visual Studio or just rename files from .html to .aspx? and then create a form in Visual studio?...
Confused :(
hey i have created an application that launches the blackberry internet browser and displays a website...
Some parts of the website does not gets displayed properly...
in fact when i run the website directly on browser then also it does not displays properly
cant understand how to display the website properly
i tried the following :
1) enable/disable javascript
2) checked security settings
3) changed the browser
Devices on which i tried :
bold - 9000
curve - 8900
storm - 9530
but cldn't find a solution
any help is appreciated!!!!!!!!!
What's the best solution for embedding non-web fonts into a page without using Flash and still maintaining cross-browser support? Has anyone used any JavaScript libraries for this? Thanks.
Forgive the beginner question, but say I have an array:
a = [1,2,3]
And a function somewhere; let's say it's an instance function:
class Ilike
def turtles(*args)
puts args.inspect
end
end
How do I invoke Ilike.turtles with a as if I were calling (Ilike.new).turtles(1,2,3).
I'm familiar with send, but this doesn't seem to translate an array into an argument list.
A parallel of what I'm looking for is the Javascript apply, which is equivalent to call but converts the array into an argument list.
When a user signs up on my site I want to be able to store whether or not they came to my site via an Adwords campaign.
I know google uses javascript to track conversions based on a cookie that is created on the users machine. Is there a way I can check this cookie so I can store the source against the user account?
I'm usig tablesorter jQuery to parse this xml file
<?xml version="1.0" encoding="iso-8859-1"?>
<CATALOG>
<CD>
<TITLE>Title 01</TITLE>
<ARTIST>Artist 01</ARTIST>
<COUNTRY>Country 01</COUNTRY>
<PRICE>10.00</PRICE>
<YEAR>2010</YEAR>
<INFO>Tooltip Info 01</INFO>
</CD>
<CD>
<TITLE>Title 02</TITLE>
<ARTIST>Artist 02</ARTIST>
<COUNTRY>Country 02</COUNTRY>
<PRICE>9.00</PRICE>
<YEAR>2009</YEAR>
<INFO>Tooltip Info 02</INFO>
</CD>
<CD>
<TITLE>Title 03</TITLE>
<ARTIST>Artist 03</ARTIST>
<COUNTRY>Country 03/COUNTRY>
<PRICE>8.00</PRICE>
<YEAR>2008</YEAR>
<INFO>Tooltip Info 03</INFO>
</CD>
</CATALOG>
and with this code
<script type="text/javascript">
$(document).ready(function(){
$.ajax({
type: "GET",
url: "file.xml",
dataType: "xml",
success: function(xml){
$(xml).find("CD").each(function(){
$("#tablebody").append('<tr><td>'
+ $(this).find("TITLE").text()
+ '</td><td>'+ $(this).find("ARTIST").text()
+ '</td><td>'+ $(this).find("COUNTRY").text()
+ '</td><td>'+ $(this).find("PRICE").text()
+ '</td><td>'+ $(this).find("YEAR").text()
+ '</td></tr>');
});
}
});
});
</script>
I'm new at javascript and have been trying with no luck for a couple of hrs to get the text from the INFO/INFO tags in the xml file to show as title attributes for each table row. The reason for that is that I need to have individual popup tooltips on mouse-over each table row.
Many Thanks in advance for any kind of help or suggestions!
I created an ASP.NET REST service (using WCF) and access it through one of my .aspx page.
the problem is that when I publish (precomile) my code to the web server, I get an error :
"ThunServ not defined" in the Javascript console of my browser.
don't know what's causing it and how to solve it.
I set new value at the last row and right col on the first page of the jqGrid.
After this I move to the next page and see the same new value on the first row and right col!!!
I am return to the first page and see in the last row and right col the previos value(not new one).
The jqGrid is initialized with datatype: "xmlstring" from javascript variable who is set with "datastr" parameter.
How to resolve the situation?
Hi everyone,
I have google analytics on my site.
One page has a button which when pressed executes some javascript.
It would be nice to monitor the number of hits the button receives when people come to this page.
Can anybody suggest the easiest way to achieve this with google analytics ?
Are there any best practices to do this ?
thanks
I have a image set as a link, with a title which is used for a caption in a lightbox. I need the "title" set in order to keep the caption for the lightbox, but I don't want the tool tip to pop up when I hover over the links. Anyone got a easy css fix? Or does this need to be done in Javascript?
what is javafx? where we can use it? whats its advantage and disadvantage over the javascript and php? i want to make project by using the javafx where can i use it in project pls describe it. thanx
I have an ajax function that is not run when the ajax script is included in my HTML page like so:
<script type='text/javascript' src='ajax.js'></script>
However, if I place the exact same script in the head portion of the HTML page, then it does run.
Why does this occur, and how can I fix it?
How would I make a regular expression to match the character '<' not followed by ('a' or 'em' or 'strong')
so <hello and <string would match, but <strong wouldn't.
UPDATE: Btw, the language I'm using is javascript
I have this code:
<html>
<head>
</head>
<body>
<form method='post'>
<link type="text/css" href="css/themename/jquery-ui-1.8.14.custom.css" rel="Stylesheet" />
<script type="text/javascript" src="js/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.8.14.custom.min.js"></script>
<style>
#feedback { font-size: 1.4em; }
#selectable .ui-selecting { background: #FECA40; }
#selectable .ui-selected { background: #F39814; color: white; }
#selectable { list-style-type: none; margin: 0; padding: 0; width: 60%; }
#selectable li { margin: 3px; padding: 0.4em; font-size: 1.4em; height: 18px; }
</style>
<script>
$(function() {
$( "#selectable" ).selectable();
});
</script>
<div class="demo">
<ol id="selectable">
<li class="ui-widget-content">Item 1</li>
<li class="ui-widget-content">Item 2</li>
<li class="ui-widget-content">Item 3</li>
</ol>
</div><!-- End demo -->
<div class="demo-description" style="display: none; ">
<p>Enable a DOM element (or group of elements) to be selectable. Draw a box with your cursor to select items. Hold down the Ctrl key to make multiple non-adjacent selections. </p>
</div><!-- End demo-description -->
</form>
</body>
</html>
I downloaded the jquery but it has no result
I used this site:
http://jqueryui.com/demos/selectable/#event-create
what is wrong here?
In IIS 5 one of the directories off the root has a leading underscore. All files under the directory are unreachable (404) from the browser. I have verified that the paths are correct.
Other javascript files outside the directory comedown fine.
Any thoughts?
Example: http://fm74g4rndmu02.corp.com/_cache/softwarecommunity/api.js
I have to support IE6 and I calculate rendering time by creating a timestamp in javascript at the beginning of the page and doing the difference when document.ready is fired in jQuery.
If I do 3 pages load, the rendering times in milliseconds can look like this :
page 1 : 735, 2672, 734
page 2 : 3063, 1516, 3375
page 3 : 8281, 2531, 3703
Why is that? How can I have more consistency?
i have developed a mobile version of a page and it uses some mobile specific java and css
i have come across many solutions to point mobile/iphone users to that specific page and desktop users to original webpage.
but what i want is that i get both things in one page and when user is on mobile that certain part of javascript and css run while on same page
without user being redirected to other pages.
is this possible
I'm interested in learning about the alternative patterns to Model-View-Controller, specifically the Model-View-Adapter and Application-View-Controller patterns.
Google results tend to be either a high-level overview or Java-based.
Can anyone either provide, or point me to, an example of these patterns in either PHP, Python or JavaScript?