$(document).ready(function() {
var pic = $(".pic");
// need to remove these in of case img-element has set width and height
$(".pic").each(function() {
var $this = $(this);
$this.removeAttr("width");
$this.removeAttr("height");
var pic_real_width = $this.width();
var pic_real_height = $this.height();
if(pic_rea...
hello,
How to load content in to a html page. please note IM not allowed to use php or C. Only javascript and html.
for example
load Page B in to Page A
http:myweb.com/index.html?load=pageb
thank you.
...
Anyone having problems with discus in IE? Works fine in FF but reports problem with thread.js in IE. (runtime error)
Disqus works fine on other sites in IE, but non on mine. Maybe ASP.NET conflict.
I have jQuery and addthis on the page but if I comment these the problem remains.
See the problem live:
http://offerta.se/artiklar/10-tip...
see my question on title.
note that I understand how to debug javascript in any browsers (including IE 7++) other than IE 6.
...
I have a problem in lightbox. This is the link when i clicked login form appears.
<a href="index.php?g=login.html" title="Login Form"
rel="gb_page_center[425, 220,login.html]">Login</a>
When I click the link before page loads, page opens in new window. light box isn't working correctly. I need to block this link utill lightbox loads...
can i use javascript and jquery both in a page?
like:
<script type="text/javascript">
$(document).ready(function(){
//some jquery
});
function xyz(){
//javascript statements
//some jquery statements
}
</script>
...
In several JavaScript libraries I saw this notation at the very beginning:
/**
* Library XYZ
*/
;(function () {
// ... and so on
While I'm perfectly comfortable with the "immediately executed function" syntax
(function(){...})()
I was wondering what the leading semicolon is for. All I could come up with is, that it is an insura...
Is there an elegant and easy/simple way to do it using PHP, Javascript or Jquery?
...
Hello everyone, how can I get the name of the browser ( I'm interested in getting IE7 because it creates problems for me) by using javascript?
Reason why I want a browser name so I can assign class to one of my footer elements which doesn't look good in IE7.
I want to do this on page load, #1 check browser name , 2# if IE 7 assign clas...
I know there are a lot of questions on here about email validation and specific RegEx's. I'd like to know what the best practices are for validating emails with respect to having the [email protected] trick (details here). My current RegExp for JavaScript validation is as follows, but it doesn't support the extra + in the h...
i am refreshing parent window from popup window,then calling parent window jquery expressions not works.
But when i enable the alert call in closePopup function in the popup.php everything works fine.
- whats wrong with me?
file test1.html
<script type="text/javascript" src="jquerymin.js"></script>
<script type="text/javascript">
var ...
For example I need to execute some function when onblur/onfocus event is processed (one element has lost focus and other has taken focus).
To be more specific I have something like the following.
<div id="foo" tabIndex="1" onblur="document.getElementById('bar').style.display = 'none';">foo</div>
<div id="bar" tabIndex="2" onclick="aler...
The html below:
<div id="catestory">
<div class="content">
<h2>some title here</h2>
<p>some content here</p>
</div>
<div class="content">
<h2>some title here</h2>
<p>some content here</p>
</div>
<div class="content">
<h2>some title here</h2>
<p>some content here</p>
</div>
</div>
when m...
Scenario:
Image with several areas mapped.
A list of text on the page
Desired functionality: When I mouseover the different pieces of text in the list, corresponding areas in the mapped image will become highlighted.
Does anyone know of a good javascript tool that can do this?
I have found a jquery plugin (map hilight) that will ...
I am currently developing Unit Tests for a Javascript method that detects the readiness of the document. This code is already at framework level, so please avoid mentions of this being already implemented in jQuery or another library.
I have successfully simulated the 'readystatechange' change event with the following code:
var event;
...
I want to pass a Java string variable to Javascript function which I am calling in Java code. Somehow the value of string remains as null. Is there any way to do this?
Here is some sample code
cb.set(CheckBox.ONCLICK,"displayCB(" + e.getFormName() + ",document.Profile.UniqueForm"+"_TestOpt)");
So in above line of code i am calling di...
I have a ListView that contains playlists. If the user wants to edit an album, they click the edit link and it allows them to remove or add songs to the playlist. If the user wants to Save a new playlist while keeping the original one, the would click a Save As Button. Here is what should happen:
If the user clicks Save As and they h...
What causes the following pageLoad to not execute in a master page? The first alert executes as expected, but the pageLoad function is not being invoked. How can I use the function within a master/content page?
<script type="text/javascript">
alert('test');
function pageLoad(sender, args) {
alert('pageLoad'...
Hi,
I have a website with some AJAX on it, basically the users clicks on a link, and some AJAX goes and fires a method that returns some HTML as show below, as the title says the data that is returned does not seem to be going into the HTML, is this why my accordions are not being made? It is strange becuase results are being returned ...
On our site www.foo.com we want to download and use http://feeds.foo.com/feed.xml with Javascript. We'll obviously use Access-Control but for browsers that don't support it we are considering the following as a fallback:
On www.foo.com, we set document.domain, provide a callback function and load the feed into a (hidden) iframe:
docume...