I am using jQuery and the cornerz plug in to get rounded corners on elements of the page without using images.
In IE7 and 8 it fails and I get this error:
"Object doesn't support this property or method"
on this lines:
if($.browser.msie && settings.fixIE) {
var ow = $$.outerWidth();
var oh = $$.outerHeight();
Basicall...
Is there a way (without binding to the window.resize event) to force a floating DIV to re-center itself when the browser window is resized?
To help explain, I imagine the pseudocode would look something like:
div.left = 50% - (div.width / 2)
div.top = 50% - (div.height / 2)
UPDATE
My query having been answered below, I wanted to pos...
Whenever i return a list collection from a controller through Json. Im unable to get that list but if i just return a string from controller its working fine.
In View i have
<script type="text/javascript" language="javascript">
$(function () {
$('#btnFillList').click(function () {
alert("btnclick"...
I've tried many jQuery twitter feed plugins and they all seem to suffer from the same problem. Nothing loads for unless I refresh several times and then it will load once. I then need to refresh several more times before it loads again.
Is there some sort of limitation on Twitters side or does this only happen to me?
Example - This is...
There is a web page with place holder (a normal div). Via ajax calls I am loading a <form> and a <script> into the place holder. The script contains necessary javascript to initialize the form (i.e. for e.g. disable the controls so as to make form read-only, etc). Here is a piece of code I have; it works, but the commented part doesn't w...
Background: I've created an online circuit design application where .draggable() div tags are containers that contain smaller div containers and so forth.
Question: For any particular div tag I need to quickly identify if it contains other div tags (that may in turn contain other div tags).
--> Since the div tags are draggable, in the ...
I have a lot of div boxes with nested div .titles, with a button inside. Is there a way in jQuery to select the parent of the button?
Something like:
$("#button").click(function(){
$("this.parent").css({'border-bottom' : 'none'});
});
Or am I going to have to rename all of my title classes to unique classes?
...
Hi
Really easy, I'm sure...
I have a div which is the full screen and I want it to slide down from the top to the bottom.
I have this:
$('#full-screen').animate({
"bottom":0,
height: 'toggle'
}, 1000, function() {
// Animation complete.
});
But this is the wrong way round as the bottom moves up; how do I get the bottom...
Eg: Google site http://www.google.com
output: http://www.google.com
Eg: Yahoo site www.yahoo.com
output: www.yahoo.com
...
I want to add a value to the onchange event, but the JS code has errors
$(args).attr('onChange', 'setTimeout('__doPostBack(\'ctl00$cpBody$txtDate\',\'\')', 0)');
anyone see error?
...
My web page has two ways of displaying a particular content.
1. When the page is loaded, the items ( images with anchor tag) are generated using ASP Repeater.
2. When user perform some Ajax action, the images are returned as JSON and I use jQuery for creating the a & img tags.
In both these methods, the anchor tags with images are dis...
Hi All!
I'm using jQuery Address to load in my content, but it's doing it twice on the init. I set it up so that if you go to the main category it loads the first image, but it's doing it twice and I'm not sure how to stop it. A fresh pair of eyes would be appreciated!
$.address.init(function(event) {
$('#carousel-clip a').address...
There are quite a few ways to write plugins i.e. here's a nice example and what I've seen quite a lot of lately is the following code pattern and it's used by Doug Neiner here;
(function($){
$.formatLink = function(el, options){
var base = this;
base.$el = $(el);
base.el = el;
base.$el.data("formatLink", base);
ba...
Just on my local machine, trying the run the following script causes my computer to crash... What am I doing wrong?
(function($) {
var count = '6824756980';
while (count > 0) {
setInterval(function() {
$('#showcount').html(Math.floor(count-1));
c...
I use jquery blockUI plugin (v2) and call $.blockUI when user submits a form. Web page smoothly fades out and new page appears. That's ok. But when user presses "back" button in opera/fire fox he observes fade out page with hourglass mouse cursor that is completely blocked.
Chrome/IE visualize page ok.
What would you suggest?
Thank y...
I have HTML similar to the following in my page
<div id="someDiv">
<img src="foo.gif" class="someImg" />
</div>
The wrapper div is set up such that when it is clicked, it's background-color changes using the following jQuery code.
$("div").click(function(event){
$(this).css("background-color", "blue");
});
I also have some ...
I am using the Jquery form plugin to submit the form via ajax. I have set up validations on the server side in my models. Now when the validation fails i want to display the same flash[:error] message to the user using ajax. If the validation succeeds I can display the flash[:notice] as it is available after the request is completed. How...
I need a little piece of advice.
I have a test page with 2 fields: word number and URL
Also i have a button Push.
When i push the button i want to open the specified URL (it's local html files) and highlight the word at the "word number" position
Of course the code must ignore element nodes (<p>,<b>,<table> and so on)
...
Im stuck, Im setting a variable when someone clicks, then testing with if to see if the variable exists and doing something else. Its a simple script which Im probably overthinking, would love someone's thoughts.
$('.view-alternatives-btn').live('click', function() {
//$("#nc-alternate-wines").scrollTo();
//$('.nc-remove').toggl...
With jQuery, is it possible to call /ControllerName/GetSomething?parameter=test, while in GetSomething method I have following:
public ActionResult Details()
{
filterQuery.OrderBy = Request.QueryString["parameter"];
var contacts = contactRepository.FindAllContacts(filterQuery).ToList();
return View("ContactList");
}
and ...