Greetings, Overflowers!
I am writing an application in PHP that will allow for editing various blocks of content via a button that loads a CKEditor Instance inside a jQuery-UI Modal Dialog box.
I've got the button working to launch the Dialog, as shown in these screenshots:
The example shows the 'Main Content' content inside the D...
Here is an interesting use of JavaScript: reordering items with drag and drop. The implementation itself in my page works fine, but is there a way to determine in which order the user put the items?
I'm asking because I want to load and save the item order in a cookie.
...
I have a Widget model with inheritance (I'm using Single-Table Inheritance, but it's equally valid for Class-per-Table). Some of the subclasses require a particular field; others do not.
class Widget < ActiveRecord
ALL_WIDGET_TYPES = [FooWidget, BarWidget, BazWidget]
end
class FooWidget < Widget
validates_presence_of :color
end
cl...
I'm currently trying to write my own JavaScript library. I'm in the middle of writing an animation callback, but I'm having trouble getting precise end values, especially when animation duration times are smaller.
Right now, I'm only targeting positional animation (left, top, right, bottom). When my animations complete, they end up hav...
i have a list of photos like this:
<div class="upimage">
<ul id="upimagesQueue" class="thumbs ui-sortable">
<li id="upimagesKHGYUD">
<a href="uploads/0002.jpg">
<img src="uploads/0002.jpg" id="KHGYUD">
</a>
</li>
<li id="upimagesNCEEKI">
<a href="uploads/0003.jpg">
<img src...
Hi, this is my code. It works fine for getting data and parsing, but I am unable to get events displayed. Please let me know the possible reason.
I feel that the callback(event) is not working here.
events: function(callback)
{
$.ajax({
type: "POST",
u...
I'm using this Jquery function for available username check.
How can I fire this Jquery function only if the username field is greater of 5 characters?
Jquery looks like:
$(document).ready(function() {
$('#usernameLoading').hide();
$('#username').blur(function(){
$('#usernameLoading').show();
$.post("usercheck.php", {
un: $('#userna...
I use this pseudo-class to make ajax request to server:
function RequestManager(url, params, success, error){
//save this ajax configuration
this._ajaxCall = null;
this._url= url;
this._type = params.type;
this._success = function(){
alert("ok");
};
this._error = function(){
alert("ko");
};
}
RequestManager.prot...
Hi,
I have a JSON response that is formatted from my C# WebMethod using the JavascriptSerializer Class. I currently get the following JSON back from my query:
{"d":"[{\"Lat\":\"51.85036\",\"Long\":\"-8.48901\"},{\"Lat\":\"51.89857\",\"Long\":\"-8.47229\"}]"}
I'm having an issue with my code below that I'm hoping someone might be able...
I've looked at some examples on the web but I am still struggling with this.
I would like to get the value for "descShort" tag within the "indexDesc" tag and then after that display the value from the "last" tag? I've seen people using the arrow > but I'm still lost.
<indices>
<index>
<code>DJI</code>
<exchange>NYSE...
I'm trying to add multiple jQuery data entries to a single element.
I suspected that the following would work
jQuery('td.person#a'+personId).data('email',thisPerson.email).data('phone',thisPerson.phone);
However, I am getting nothing but errors when I do this.
jQuery('td.person#a'+personId).data('email',thisPerson.email);
jQuer...
im having a little trouble getting the background image to swap out on click()
$('.highlight-boxes li a[class!=selected-box]').click(function() {
$('.highlight-content').hide();
$('.highlight-boxes li a').removeClass();
$(this).addClass('box-selected'); // problem here
var selected = $(this).attr('h...
In this link: http://css-tricks.com/snippets/jquery/jquery-plugin-template/ it has a line of code that says
// Add a reverse reference to the DOM object
base.$el.data("yourPluginName", base);
what does the "reverse reference to the DOM object" mean?
...
Is there any way to integrate editable grid view into drupal framework(form or node) so that we can perform operations like edit delete by onclick events as shown in example link text
...
Hi i have a table strcture for my menu, and i need to be able to collapse/expand the menu from level2, so that all level3 cells becone visible. My HTML is like this:
<table>
<tr><td class="level1"><a href="abc.html">First Item</a></td></tr>
<tr><td class="level2"><a href="def.html">SecondItem</a></td></tr>
<tr><td class="level3"><a href...
I would like to post a form using ajax and jquery to a .asmx webservice and return the value from the webservice as JSON.
I'm using ASP.NET 4.0. I know that in order to return JSON from a webservice the following needs to be set (1) dataType: "json" (2) contentType: "application/json; charset=utf-8", (3) type: "POST" (4) set the Data t...
i have two select using as a dropdownlist for country/state
everything works as i expected but when i do a postback then i lost the values from the above <select...> what is the best way to retain the values and can you show me with an example please?
<asp: Button ID="Button1" runat="server"
onclick="Button1_Click" Text="PostBack" /...
I'm trying to use jQuery to find the number of divs that are both visible, and have a background color of Green.
(Normally I'd just add a class to the div, style it green, and check for that class in jQuery but in this instance, I can't actually change the markup of the page itself in any way)
I currently have the visible div part work...
I'm not sure why this isn't working. I don't have any errors, but what happens is, no matter what marker I click on, it always clicks the last marker. Im not sure why though because the_marker is set up the same way. How can I fix this?:
(Updated with new jQuery + XML)
$(function(){
var latlng = new google.maps.LatLng(45.522015,-12...
Hi,
I have a nested ul/li list
<ul>
<li>first</li>
<li>second
<ul>
<li>Third</li>
</ul>
</li>
... and so on
I found this JQuery on the interweb to use as inspiration, but how to keep the one item i expanded open after the page has reloaded?
<script type="text/javascript">
$(document).ready(function() {
$('div#side...