I've been searching and i can't find any ff addons or javascript for finding unused css in ajax apps.
dust-me selectors
can do a site-crawl, but i'm looking for something that examines loaded-in content...
I'd like something where i can press 'record' and then make a load of clicks which will check off the used selectors, and hoping to find an existing one rather than try to write my own with jquery!
In Google Chrome, open up the page you want find the unused css rules
How do I add a watermark image onto other images?
I'm able to place text on an image as a water mark but now I have an image that I'd like to put on there instead of the text. How do I do this in C#?
Just one more time to be specific, I have image X and I want to use it as a watermark symbol. I want this symbol to appear on all my image when shown on my website. So I will have image X watermarked on image Y and Z.
Here's the code I currently have that creates the watermark:
public
I have the following CSS that works within Firefox but not IE. Obviously, the fonts are within the directory. Any suggestions?
@font-face {
font-family: "Futura";
src: url("../fonts/Futura_Medium_BT.eot"); /* IE */
src: local("Futura"), url( "../fonts/Futura_Medium_BT.ttf" ) format("truetype"); /* non-IE */
}
body nav {
font-family: Futura, Verdana, Arial, sans-serif;
font-size:1.2em;
height: 40px;
}
I've written a blog post in the past on how to get
I've been using LESS CSS and I find it great. The only drawback is that the code is not shown on firebug's inspector.
IS there a way of dealing with this problem?
LESS generates a element after the CSS transformation occurs, so you're able to check elements attributes at firebug.
Nope. Here's a pretty up-to-date list of Firebug plugins.
You can always write one? :)
Yes!
Just click on the CSS tab (inside firebug) and select the inline stylesheet to see the CSS LESS CSS
$.ajax({
type: 'POST',
url: api_url+'client/'+client.id+'.json',
data: {
_method: 'delete',
id: client.id
},
success: function(data) {
$('#delete-client').html('Success');
},
error: function(data) {
$('#delete-client').css('color', 'red');
$('#delete-client').html('Error');
}
});
On the error: function the jquery would recieve this json object with a 500 header status
{"errors":{"code":777,"message":"Method
rails newbie herem, I'm looking to learn a little bit about jquery so I figured I'd try to switch between my partial views using AJAX.
Right now on my user's dash I have a link to their 'likes' page, it requires a full reload to see the 'likes' page, how would I change this to refresh with the likes_user_path@user)??
views/pages/home.html.erb
<div id="left">
<div id="dash-statistics">
<a href="<%= likes_user_path(@user) %>">
<div
Given a list of image paths how can I iterate through them and find the actual image dimensions? I assume I have to insert them into the DOM without width or height properties and do a .width and .height on them?
var paths = ['/path/image.png', 'somewhere/page.jpg'];
$.each(paths, function(i, path) {
var img = new Image();
$(img).load(function() {
var width = img.width,
height = img.height;
alert(width + ' × ' + height);
});
I've discovered that my host may only support MyISAM and not InnoDB. Thus, I lack built-in foreign key support. How would I then implement a many-to-many relationship with three tables in PHPMyAdmin? The only solution is to enter in the relations manually through MySQL queries, correct?
I would implement it in the same way as you would using Innodb but ensure data integrity in the application layer. If you have a good data abstraction layer then this should be fairly simple
In JSLint, it warns that
var x = new Array();
(That's not a real variable name) should be
var result = [];
What is wrong with the 1st syntax? What's the reasoning behind the suggestion?
Crockford doesn't like new. Therefore, JSLint expects you to avoid it when possible. And creating a new array object is possible without using new....
It's safer to use [] than it is to use new Array(), because you can actually override the value of Array in JavaScript:
Array = function() {
i have a web service implemented in java using apache cxf and spring. But the requirement is the same i need that service to be implemented in .net and use that service with my java project web service client..... the package structure of the interface and its implementation should be simulated in .net..... i am novoice to .net and donno how it can be done...
any help is appreciated..........
I'm want to show all the users that are online, in real-time on my website. Not sure how to go about this though. It can't be hard to add new users once they log in, but I'll also need to remove users that are not logged in anymore.
Any idea how to do this? Should I check with jQuery what users have loged off and remvove them from the list etc?
Your problem is going to be people navigating away without logging out, their session will still exist for how ever long you have the
Possible Duplicate:
How do I, with JavaScript, change the URL in the browser without loading the new page?
I noticed that web apps like GMail and GrooveShark can change the URL in the address bar of my browser without refreshing the page. Ajax is obviously used to change the content. How can I change the URL?
Gmail and Grooveshark only change the hash, this is done by changing:
location.hash = 'blah'
If you target HTML5 enabled browsers, you can use