I have written a plugin that looks like this so far:
(function($) {
var textarea;
$.fn.bbcode = function(opt)
{
var i = 0;
return this.each(function(i) {
textarea = this;
var strHTML = '<div id="editor" class="editor-instance-' + i + '">';
strHTML += '<div class="btn ...
Basically, I want many(>25) divs to be displayed one on top of the other so that only one can be seen at a time. I have the jQuery UI draggable implemented, so once a div is dragged away, the next div is shown. What CSS do I need to make such a stack of divs? jQuery is also available if required.
Thanks!
...
jQuery's animation engine isn't working well for me. It doesn't have easing and color animation built-in, and the plugins I am using for them don't work properly together consistently.
I've had good experience with YUI's animation engine in the past. Is it possible to use jQuery to select items, and then use YUI to animate them? Here's ...
I have these two codes -
new function($) {
$.fn.getCursorPosition = function() {
var pos = 0;
var el = $(this).get(0);
// IE Support
if (document.selection) {
el.focus();
var Sel = document.selection.createRange();
var SelLength = document.selection.createRange().text.length;
Sel.moveStart('character', -el.value.length)...
Edit: This is technically a 2 part question. I've chosen the best answer that covers the question in general and linked to the answer that handles the specific question.
What is the best way to document anonymous objects and functions with jsdoc?
/**
* @class {Page} Page Class specification
*/
var Page = function() {
/**
* ...
Hi guys
I'm try to create a sliding banner with jquery here.
I tried to code in this manner
.post(this,{ajax : 1}, function(data){
var oldImage = $('div.banner > img');
var newImage = $(data).insertAfter(oldImage).css('position','absolute').css('left',800);
newImage.load(function(){
oldImage.animate({left:-800},'med...
Hello,
I am trying to interact with Twitter via JavaScript. I want to pass a pre-set message to a user's Twitter status page when they click a link. In an attempt to do this, I have a link defined as follows:
<a href="#" onclick="updateTwitterStatus();">Update Status</a>
<script type="text/javascript">
function updateTwitterStatus()...
i have already included jquery.js and jquery.1.3.2.js on my page for other functionality.I think it is getting conflicted with other.plz reply
...
Its a simple javascript bookmarklet which grabs title,url and selected text. To make sure it grabs the title perfectly(just the title) I had to make this bookmarklet long.It works just fine if i edit the bookamrklet manually.Its way too long to drag and drop just like usual bookmarklet. But i tried a lot through different way to make an ...
Hi all i want to inplemnt this combobox in extjs main thing is how to make "selected" value 3
<select name="meter_payment_option" onChange="smart_meter(this.value)">
<option value ="1">All Up-Front</option>
<option value ="2">Reduced Up-Front</option>
<option value ="3" selected="selected">No Up-Front</option>
</select>
till now ...
In Javascript, is there a case where self.location != document.location?
...
I have a Python script and a JS on my server. In the python script, I want to set the value of a variable to be the output of one of the functions in my .js file.
Is this possible, and if so how wold one go about doing this?
Thanks!
...
Hello,
Following this problem http://stackoverflow.com/questions/1245033/asp-net-onserverclick-event-handler-not-called-if-using-onclick
I implemented a workaround:
<button id="idBtnPrint" runat="server" type="submit" onserverclick="BtnPrint_Click" onclick="confirmImpression();">print</button>
javascript function:
function conf...
I have 9 select boxes on my page containing lots of subcategories for businesses. I require the user to select an option from only 1 of the 9 selects. To make the user experience better I hide all of the select boxes with CSS and generate a dynamic select box of categories. When a category is selected from the generated dropdown, the s...
Hello
I want the document.write code to load a page(as iframe)
example - i need document.write function to get http://google.com
I dont want html function but as document.write
...
So I have a bit of a problem. When I ask MooTools to send a request it comes back as failed every time. I can't seem to diagnose the problem either because if I try to get the returned header info the console just gives me "Refused to get unsafe header 'Status'" Message. The only thing I can think of is that the server isn't letting me a...
here is the code and also i want onPaste event instead of click but nothing working
var mpan0 = new Ext.form.TextField({
name:'mpan[]' ,
value:0 ,
allowblank:false ,
enableKeyEvents:true ,
fieldLabel:'Mpan',
maxLength:2,
width:35
});
mpan0.addListener('click', function(){
alert( "amiy");
});
...
I've got a webpage that validates as XHTML 1.0 Strict. I'm using YUI3 and I'm using the seed-file-based instantiation. In several places in my javascript code, I'm doing something like:
YUI().use("node", function(Y){
var node = Y.one("#my_element_id");
});
It works great, cross-platform, cross-browser, etc. in almost every case. How...
In extjs you can always extend an extjs class via the constructor(). For classes derinving from Component you can also extend via initComponent().
I am wondering why so many code extend via initComponent, whereas constructor seems to be the universal extension method. Does initComponent offer clear advantage over constructor?
...
I'd like to modify some parts of my website to show popups when a user clicks on some <td> elements. I'd like to keep the modification very simple, which is why I considered using a JavaScript framework. It does not really matter which, but I'd like to be able to include html in the tooltip's text.
What's the easiest way to achieve this?...