JQuery :: Set Ui.size.width Of Resizable Img, After Init?
Apr 23, 2011
My resizable works great. I want to be able to set the width and height after init. How do I set the width and height from a javascript function? I am using the onClick event of an IMG to call a javascript function.
I want to set the height and width of my resizable, so I want to set ui.size.width and ui.size.height.
How do I reference ui.size.width and ui.size.height of my resizable within a javascript function?
I have 2 monitors with a different resolution. It is important in yapplicationthat I get the screen size of the monitor wherethe webbrowser is located. When I try to get the screen size (window.screen.height + window.screen.width) only IE gives me always the screen size of the main monitor where my taskbar (windows7) is located, instead of the screen size of the secondary screen where the webbrowser is located. It does work in all other webbrowsers .
I have created a page with an alert on JSbin.com to show you your screen resolution. If you use 2 monitors open the page in one of the monitors. You will notice you will get the screen resolution of the screen where your web browser is located, except in IE (hoera!)
I have a div that appears directly below a text box. When the user clicks on an item in the div, i place it in the textbox. I want the width of both the textbox and the div to be that of the largest item in the div.
However, setting the textbox to have the same width of the div will not show all the characters of the selected text. I assume this is because of differences between pixel width and the input size property.
does anyone know if we have someway to validate the cycle init? i mean ... can i have a callback function like onSuccess ? or maybe isReady where i can do more stuff after cycle is ready??
var processscroll = { init: function() { ... } } And I have this:
onload = filescroll.init;
I also want processscroll.init to run on onload. How can I do this? I assume I can just combine the two functions, but I don't know enough about JavaScript to know how to do that.
In my application I am using resizable property for the <div> In my script i used like this $("div").resizable(); Its working fine for all the <div> tags. My requirement is to get the <div> id and I have to save the height, width of that particular <div>. I can able get the height and width of the every div but not the id. I tried in 2 ways like var divId=$(this).attr("id"); and var divId=this.id; in _mouseDrag() in the jquery.ui.resizable.js file. In both the cases divId is undefined.
I think this has probably been asked before but. I want to resize an element that has .resizable() on it. I want the resizable 'stop' event to trigger when it is done.
I have this javascript code which I would like to call the refresh method in my init function but I can't seems to be able to call it. What is the proper way of doing this?
I am using this settings to init my tinyMCE but unfortunelty its not working on IE..
HTML Code: var config = { settings : {[code]....
SCRIPT5: Access is denied.line 94 is the init function.. and when im using the init function without the settings then its working on explorer too :S tinyMCE.init( ); what am i doing wrong?
I've got some problem with more then one plugin from jQuery.
My Problem is: if I use some "resizable background"-script (it works on IE7+/FF/Chrome), and the content is longer then 100% height of the screen (ipad/iphone), there's a white place at the bottom of my background-image.
The solution was, to fix the background, but it still doesn't work on mobile devices.
Is there any way that one could have supersubs functionality applied to drop-down multi-column menus?I assume one would need to calculate the width of each column plus the combined width for the container.
I currently have a website where i share thoughts with my friends (some kind of forum) and within this 'forum' people can post pictures they made but most of the time these pictures exceed the max width of my website so my website gets all streched out!So this is what i want: all images on the page must run thru some sort of function which checks if the image image width exceeds the max_width. if it does then the script must calculate how many pixels the current width exceeds the max_width and get this number so that the script does: current_width = current_width - (max_width - current_width)
I've recently start using Flexigrid (old JQuery grid plugin), and, as you may know, one of the few issue this really good grid plugin got is the lack of liquid layout option. My personal idea to solve the problem is to set the "width" parameter depending on $(window).width. Here is the problem (and here's why i post this question in "General use" and not in "Plugin").
The starting, and working, code is: $(document).ready(function(){ $("#flex1").flexigrid ( {
[Code].....
This work fine for me, but I supose it could be done way much elegant... maybe somethin without "IF" that could emulate the "%", like var percentage = $(#div.id).width()*0.XX with the 0.XX picked from an array of percentage, one for each column. Probably I should set up a function... ahhhh, as you may easily see I'm a total beginner with JQuery (and JS in general...)
Is the next jQuery code the best way to decrease an elements width?[code]I tried using the next code:[code]but that's not working, also not with '-20'.Maybe it's an idea to add this functionality? It's is already used in the .animate() function for changing the position of an element.
I am new to Jquery mobile framework.I have an asp.net web application and I want to convert it into Jquery mobile framework.I have a datalist on an aspx page.The size of the datalist decreases according to the window size to certain extent after which the size of the datalist becomes constant and doesn't decrease with the window size.
I have a web application where we pop up a little calendar control in a new window to allow users to choose dates. For cross-browser purposes, this is done via window.open (with some code to make it behave like a modal dialog) and I set the width and height of the window such that the controls fit nicely and it all looks good.
I have some users who are unable to see the OK and Cancel buttons at the bottom of the window due to some display settings on their machines. OK, I though, I'll just make the window resizable and they can then take control. How naive of me! Why on earth does IE decide that the minute I put 'resizable=yes' into my attributes for the new window that it should ignore the size?
I know I can do window.resizeTo in the onload of the calendar window, but I'm not keen on the resizing of the window.
I don't suppose anyone knows of a way to have IE open a resizable window of a given size without the resizeTo?
I have a function that opens a popup and I have told it not make the popup resizable but all browsers seem to ignore it and make it resizable anyway. This is the code
function openflvpopup(popurl){ window.open('FLV/play.php?file=' + popurl + '.flv', '', 'height=500px,width=550px,left=150px,top=150px,resizable=0') }
I have probably made a silly mistake but I have checked several tutorial website to make sure I write it in the syntax that they do. I can not see any mistakes.
<script language="JavaScript"><!-- /*RESIZABLE DOM GRID - (C) COPYRIGHTED DON WATSON 2003 ALL RIGHT RESERVED - DONWATS@USA.COM*/ function mouseevent(elm, _event, _function) { elm.attachEvent(_event, _function) }
function mousedetach(elm, _event, _function) { elm.detachEvent(_event, _function) }
function resizeGrid() { var srcElem = event.srcElement;
/*lets get the rule (css)*/ ruleNum = expandingTD.firstChild.className; /*assume its the span*/ ruleNum = ruleNum.substr(ruleNum.length-1,1);/*strip the num off the end*/
var _head = document.getElementsByTagName('head').item(0);
var dss = document.createElement("STYLE"); dss.id = "rowspans"; _head.appendChild(dss);
var _table = document.getElementById("grid"); var _tr = _table.getElementsByTagName("TR")[0]; var _td = _tr.getElementsByTagName("TD"); var colnum = 0;
I cannot seem to set a size for a text area relative to total screen width in CSS or HTML or Javascript? When I use CSS or a percent value in the cols attribute, they size the textarea as a percentage of another text area on the screen.
Is it possible that first I make my window resizable,than if window is less than a fixed size I can make my window not resizable?Better to say can I change resizable feature during runtime?If possible,than how?
I've been using this script (and variants that give the user different controls) for years and am positive it worked before but I just noticed that resizable is being ignored in FF 3.0.11. It is working in IE fine. I don't want the user to be able to resize the window.
Code:
function PopNada(PopNadaUrl,xW,xH) { var ScreenWidth=window.screen.width; var ScreenHeight=window.screen.height;