code
stringlengths
1
2.08M
language
stringclasses
1 value
/* CUSTOM FORM ELEMENTS Created by Ryan Fait www.ryanfait.com The only things you may need to change in this file are the following variables: checkboxHeight, radioHeight and selectWidth (lines 24, 25, 26) The numbers you set for checkboxHeight and radioHeight should be one quarter of the total height of...
JavaScript
/** * jQuery Galleriffic plugin * * Copyright (c) 2008 Trent Foley (http://trentacular.com) * Licensed under the MIT License: * http://www.opensource.org/licenses/mit-license.php * * Much thanks to primary contributer Ponticlaro (http://www.ponticlaro.com) */ ;(function($) { // Globally keep track ...
JavaScript
var setInit={ autenticar : function(){ reposta=dadosJSON.btAutenticarUsuario(); }, cadastrar_musica : function(){ $(document).ready(function() { var paramRequisicao='?ComandoProcessamento=2&DadosJson=NULL&Objeto=5&Condicao=NULL'; var url='/WS_APP_SMART_BUSINESS/public/AjaxServletProces...
JavaScript
var carregarTabela={ iniciar : function(idHtml,itemsJSON){ var items_Tabela=''; var idRow = parseInt('0'); $.each(itemsJSON, function(key, val) { idRow = parseInt(idRow) + parseInt('1'); items_Tabela +='<tr id="idRow_'+idRow+'">'; var id_nome_tabela ='tabela-dados'; ...
JavaScript
/*! Copyright (c) 2010 Brandon Aaron (http://brandonaaron.net) * Licensed under the MIT License (LICENSE.txt). * * Version 2.1.2 */ (function($){ $.fn.bgiframe = ($.browser.msie && /msie 6\.0/i.test(navigator.userAgent) ? function(s) { s = $.extend({ top : 'auto', // auto == .currentStyl...
JavaScript
/*! * jQuery Form Plugin * version: 3.09 (16-APR-2012) * @requires jQuery v1.3.2 or later * * Examples and documentation at: http://malsup.com/jquery/form/ * Project repository: https://github.com/malsup/form * Dual licensed under the MIT and GPL licenses: * http://malsup.github.com/mit-license.tx...
JavaScript
var business={ getUrlVars: function(){ try { var variaveis=location.search.split("?"); var valor = variaveis[1].split("="); return valor; } catch(err) { //alert(err); return 'undefin...
JavaScript
var InicializarPagina={ enviarDadosJSON : function(url){ $(document).ready(function() { $.get(url, function(responseJson) { alert(responseJson); }); }); }, CadastrarMusica : function(){ alert('CadastrarMusica'); var url1='/RadioWeb/private/AjaxServletCe...
JavaScript
var acao_butao={ serializarFormulario : function(idFormulario){ alert('serializarFormulario'); $(document).ready(function() { // put all your jQuery goodness in here. $.fn.serializeObject = function() { var o = {}; var a = this.serializeArray(); ...
JavaScript
var inicializarTabela={ iniciar : function(){ alert('iniciar'); (function($){ //var dados_json='{"idArquivoMusica":0,"idpasta":'+$("#idpasta").val()+',"nome_arquivo":"null","tipoArquivo":"null","tamanho":"null","duracao":"null","data":"null"}'; $dgLocal.datagrid({ ...
JavaScript
/*! * jQuery Form Plugin * version: 3.09 (16-APR-2012) * @requires jQuery v1.3.2 or later * * Examples and documentation at: http://malsup.com/jquery/form/ * Project repository: https://github.com/malsup/form * Dual licensed under the MIT and GPL licenses: * http://malsup.github.com/mit-license.tx...
JavaScript
/* * DC Mega Menu - jQuery mega menu * Copyright (c) 2011 Design Chemical * */ (function($){ //define the defaults for the plugin and how to call it $.fn.dcMegaMenu = function(options){ //set default options var defaults = { classParent: 'dc-mega', classContainer: 'sub-container', cl...
JavaScript
(function($) { $.extend({ tablesorterPager: new function() { function updatePageDisplay(c) { var s = $(c.cssPageDisplay,c.container).val((c.page+1) + c.seperator + c.totalPages); } function setPageSize(table,size) { var c = table.config; c.size = size; c.totalPages = Math...
JavaScript
(function() { var $, Node, Tree, methods; $ = jQuery; Node = (function() { function Node(row, tree, settings) { var parentId; this.row = row; this.tree = tree; this.settings = settings; // TODO Ensure id/parentId is always a string (not int) this.id = this...
JavaScript
var view={ VisualizarPagina : function(idHtml,nome_pagina,paramentroJSON){ $( idHtml ).dialog({ bgiframe: true, autoOpen: false, height: 500, width: 1000, modal: true, open: function(event, ui) { $(event.target).parent().css('position', 'fixe...
JavaScript
var ajaxJSON={ enviarDadosJSON:function(url){ alert('enviarDadosJSON'); $(document).ready(function() { $.get(url, function(responseJson) { alert(responseJson); return responseJson; }); }); } };
JavaScript
/****************************************** Auto-readmore link script, version 2.0 (for blogspot) (C)2008 by abu iyad http://abu-iyad.blogspot.com ********************************************/ function removeHtmlTag(strx,chop){ if(strx.indexOf("<")!=-1) { var s = strx.split("<"); for(var i=0;i<s.le...
JavaScript
//** Featured Content Slider script- (c) Dynamic Drive DHTML code library: http://www.dynamicdrive.com. //** May 2nd, 08'- Script rewritten and updated to 2.0. //** June 12th, 08'- Script updated to v 2.3, which adds the following features: //1) Changed behavior of script to actually collapse the previous content...
JavaScript
var Drupal = Drupal || { 'settings': {}, 'behaviors': {}, 'locale': {} }; // Allow other JavaScript libraries to use $. jQuery.noConflict(); (function ($) { /** * Attach all registered behaviors to a page element. * * Behaviors are event-triggered actions that attach to page elements, enhancing * default non-Ja...
JavaScript
(function ($) { /** * Drag and drop table rows with field manipulation. * * Using the drupal_add_tabledrag() function, any table with weights or parent * relationships may be made into draggable tables. Columns containing a field * may optionally be hidden, providing a better user experience. * * Created tableD...
JavaScript
(function ($) { /** * A progressbar object. Initialized with the given id. Must be inserted into * the DOM afterwards through progressBar.element. * * method is the function which will perform the HTTP request to get the * progress bar state. Either "GET" or "POST". * * e.g. pb = new progressBar('myProgressBar'...
JavaScript
(function ($) { /** * Attach the machine-readable name form element behavior. */ Drupal.behaviors.machineName = { /** * Attaches the behavior. * * @param settings.machineName * A list of elements to process, keyed by the HTML ID of the form element * containing the human-readable value. Each ele...
JavaScript
(function ($) { Drupal.behaviors.tableSelect = { attach: function (context, settings) { // Select the inner-most table in case of nested tables. $('th.select-all', context).closest('table').once('table-select', Drupal.tableSelect); } }; Drupal.tableSelect = function () { // Do not add a "Select all" che...
JavaScript
/** * jQuery Once Plugin v1.2 * http://plugins.jquery.com/project/once * * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html */ (function ($) { var cache = {}, uuid = 0; /** * Filters elements by whether they ha...
JavaScript
/** * @file * Conditionally hide or show the appropriate settings and saved defaults * on the file transfer connection settings form used by authorize.php. */ (function ($) { Drupal.behaviors.authorizeFileTransferForm = { attach: function(context) { $('#edit-connection-settings-authorize-filetransfer-defau...
JavaScript
(function ($) { /** * Retrieves the summary for the first element. */ $.fn.drupalGetSummary = function () { var callback = this.data('summaryCallback'); return (this[0] && callback) ? $.trim(callback(this[0])) : ''; }; /** * Sets the summary for all matched elements. * * @param callback * Either a functio...
JavaScript
(function ($) { /** * The base States namespace. * * Having the local states variable allows us to use the States namespace * without having to always declare "Drupal.states". */ var states = Drupal.states = { // An array of functions that should be postponed. postponed: [] }; /** * Attaches the states. */...
JavaScript
(function ($) { /** * Attaches the batch behavior to progress bars. */ Drupal.behaviors.batch = { attach: function (context, settings) { $('#progress', context).once('batch', function () { var holder = $(this); // Success: redirect to the summary. var updateCallback = function (progress, sta...
JavaScript
(function ($) { Drupal.behaviors.textarea = { attach: function (context, settings) { $('.form-textarea-wrapper.resizable', context).once('textarea', function () { var staticOffset = null; var textarea = $(this).addClass('resizable-textarea').find('textarea'); var grippie = $('<div class="grippi...
JavaScript
(function ($) { /** * Attaches the autocomplete behavior to all required fields. */ Drupal.behaviors.autocomplete = { attach: function (context, settings) { var acdb = []; $('input.autocomplete', context).once('autocomplete', function () { var uri = this.value; if (!acdb[uri]) { acdb[ur...
JavaScript
(function ($) { /** * This script transforms a set of fieldsets into a stack of vertical * tabs. Another tab pane can be selected by clicking on the respective * tab. * * Each tab may have a summary which can be updated by another * script. For that to work, each fieldset has an associated * 'verticalTabCallba...
JavaScript
(function ($) { /** * Set the client's system time zone as default values of form fields. */ Drupal.behaviors.setTimezone = { attach: function (context, settings) { $('select.timezone-detect', context).once('timezone', function () { var dateString = Date(); // In some client environments, date stri...
JavaScript
(function ($) { /** * Toggle the visibility of a fieldset using smooth animations. */ Drupal.toggleFieldset = function (fieldset) { var $fieldset = $(fieldset); if ($fieldset.is('.collapsed')) { var $content = $('> .fieldset-wrapper', fieldset).hide(); $fieldset .removeClass('collapsed') .tri...
JavaScript
(function ($) { /** * Attaches sticky table headers. */ Drupal.behaviors.tableHeader = { attach: function (context, settings) { if (!$.support.positionFixed) { return; } $('table.sticky-enabled', context).once('tableheader', function () { $(this).data("drupal-tableheader", new Drupal.table...
JavaScript
/** * Cookie plugin 1.0 * * Copyright (c) 2006 Klaus Hartl (stilbuero.de) * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html * */ jQuery.cookie=function(b,j,m){if(typeof j!="undefined"){m=m||{};if(j===null){j="";m.expires=...
JavaScript
(function ($) { /** * Provides Ajax page updating via jQuery $.ajax (Asynchronous JavaScript and XML). * * Ajax is a method of making a request via JavaScript while viewing an HTML * page. The request returns an array of commands encoded in JSON, which is * then executed to make any changes that are necessary to ...
JavaScript
(function ($) { Drupal.behaviors.menuFieldsetSummaries = { attach: function (context) { $('fieldset.menu-link-form', context).drupalSetSummary(function (context) { if ($('.form-item-menu-enabled input', context).is(':checked')) { return Drupal.checkPlain($('.form-item-menu-link-title input', contex...
JavaScript
(function ($) { Drupal.behaviors.menuChangeParentItems = { attach: function (context, settings) { $('fieldset#edit-menu input').each(function () { $(this).change(function () { // Update list of available parent menu items. Drupal.menu_update_parent_list(); }); }); } }; /** * F...
JavaScript
Drupal.t("Standard Call t"); Drupal . t ( "Whitespace Call t" ) ; Drupal.t('Single Quote t'); Drupal.t('Single Quote \'Escaped\' t'); Drupal.t('Single Quote ' + 'Concat ' + 'strings ' + 't'); Drupal.t("Double Quote t"); Drupal.t("Double Quote \"Escaped\" t"); Drupal.t("Double Quote " + "Concat " + "strings " + "t");...
JavaScript
(function ($) { /** * Attaches language support to the jQuery UI datepicker component. */ Drupal.behaviors.localeDatepicker = { attach: function(context, settings) { // This code accesses Drupal.settings and localized strings via Drupal.t(). // So this code should run after these are initialized. By placin...
JavaScript
(function ($) { Drupal.toolbar = Drupal.toolbar || {}; /** * Attach toggling behavior and notify the overlay of the toolbar. */ Drupal.behaviors.toolbar = { attach: function(context) { // Set the initial state of the toolbar. $('#toolbar', context).once('toolbar', Drupal.toolbar.init); // Toggling t...
JavaScript
/** * @file * Javascript behaviors for the Book module. */ (function ($) { Drupal.behaviors.bookFieldsetSummaries = { attach: function (context) { $('fieldset.book-outline-form', context).drupalSetSummary(function (context) { var $select = $('.form-item-book-bid select'); var val = $select.val()...
JavaScript
/** * @file * Attaches the behaviors for the Field UI module. */ (function($) { Drupal.behaviors.fieldUIFieldOverview = { attach: function (context, settings) { $('table#field-overview', context).once('field-overview', function () { Drupal.fieldUIFieldOverview.attachUpdateSelects(this, settings); ...
JavaScript
/** * @file * Attaches behaviors for the Contextual module. */ (function ($) { Drupal.contextualLinks = Drupal.contextualLinks || {}; /** * Attaches outline behavior for regions associated with contextual links. */ Drupal.behaviors.contextualLinks = { attach: function (context) { $('div.contextual-links-w...
JavaScript
(function ($) { /** * Auto-hide summary textarea if empty and show hide and unhide links. */ Drupal.behaviors.textSummary = { attach: function (context, settings) { $('.text-summary', context).once('text-summary', function () { var $widget = $(this).closest('div.field-type-text-with-summary'); var...
JavaScript
(function ($) { /** * Attach handlers to evaluate the strength of any password fields and to check * that its confirmation is correct. */ Drupal.behaviors.password = { attach: function (context, settings) { var translate = settings.password; $('input.password-field', context).once('password', function () ...
JavaScript
(function ($) { /** * Shows checked and disabled checkboxes for inherited permissions. */ Drupal.behaviors.permissions = { attach: function (context) { var self = this; $('table#permissions').once('permissions', function () { // On a site with many roles and permissions, this behavior initially has ...
JavaScript
(function ($) { /** * Provide the summary information for the block settings vertical tabs. */ Drupal.behaviors.blockSettingsSummary = { attach: function (context) { // The drupalSetSummary method required for this behavior is not available // on the Blocks administration page, so we need to make sure this...
JavaScript
/** * @file * Attaches the behaviors for the Color module. */ (function ($) { Drupal.behaviors.color = { attach: function (context, settings) { var i, j, colors, field_name; // This behavior attaches by ID, so is only valid once on a page. var form = $('#system-theme-settings .color-form', context).o...
JavaScript
/** * @file * Attaches preview-related behavior for the Color module. */ (function ($) { Drupal.color = { callback: function(context, settings, form, farb, height, width) { // Solid background. $('#preview', form).css('backgroundColor', $('#palette input[name="palette[base]"]', form).val()); ...
JavaScript
/** * @file * Attaches behaviors for the Path module. */ (function ($) { Drupal.behaviors.pathFieldsetSummaries = { attach: function (context) { $('fieldset.path-form', context).drupalSetSummary(function (context) { var path = $('.form-item-path-alias input').val(); return path ? Drupal...
JavaScript
(function ($) { /** * Handle the concept of a fixed number of slots. * * This behavior is dependent on the tableDrag behavior, since it uses the * objects initialized in that behavior to update the row. */ Drupal.behaviors.shortcutDrag = { attach: function (context, settings) { if (Drupal.tableDrag) { ...
JavaScript
(function ($) { Drupal.behaviors.contentTypes = { attach: function (context) { // Provide the vertical tab summaries. $('fieldset#edit-submission', context).drupalSetSummary(function(context) { var vals = []; vals.push(Drupal.checkPlain($('#edit-title-label', context).val()) || Drupal.t('Requires...
JavaScript
(function ($) { Drupal.behaviors.nodeFieldsetSummaries = { attach: function (context) { $('fieldset.node-form-revision-information', context).drupalSetSummary(function (context) { var revisionCheckbox = $('.form-item-revision input', context); // Return 'New revision' if the 'Create new revision' c...
JavaScript
(function ($) { /** * Show/hide the 'Email site administrator when updates are available' checkbox * on the install page. */ Drupal.hideEmailAdministratorCheckbox = function () { // Make sure the secondary box is shown / hidden as necessary on page load. if ($('#edit-update-status-module-1').is(':checked')) { ...
JavaScript
(function ($) { /** * Checks to see if the cron should be automatically run. */ Drupal.behaviors.cronCheck = { attach: function(context, settings) { if (settings.cronCheck || false) { $('body').once('cron-check', function() { // Only execute the cron check if its the right time. if (Math....
JavaScript
(function ($) { /** * Add functionality to the profile drag and drop table. * * This behavior is dependent on the tableDrag behavior, since it uses the * objects initialized in that behavior to update the row. It shows and hides * a warning message when removing the last field from a profile category. */ Drupal....
JavaScript
/** * @file * Provides JavaScript additions to the managed file field type. * * This file provides progress bar support (if available), popup windows for * file previews, and disabling of other file fields during Ajax uploads (which * prevents separate file fields from accidentally uploading files). */ (functio...
JavaScript
(function ($) { /** * Add the cool table collapsing on the testing overview page. */ Drupal.behaviors.simpleTestMenuCollapse = { attach: function (context, settings) { var timeout = null; // Adds expand-collapse functionality. $('div.simpletest-image').once('simpletest-image', function () { var $...
JavaScript
(function ($) { /** * Move a block in the blocks table from one region to another via select list. * * This behavior is dependent on the tableDrag behavior, since it uses the * objects initialized in that behavior to update the row. */ Drupal.behaviors.termDrag = { attach: function (context, settings) { var...
JavaScript
(function ($) { Drupal.behaviors.commentFieldsetSummaries = { attach: function (context) { $('fieldset.comment-node-settings-form', context).drupalSetSummary(function (context) { return Drupal.checkPlain($('.form-item-comment input:checked', context).next('label').text()); }); // Provide the summ...
JavaScript
(function ($) { Drupal.behaviors.openid = { attach: function (context) { var loginElements = $('.form-item-name, .form-item-pass, li.openid-link'); var openidElements = $('.form-item-openid-identifier, li.user-link'); var cookie = $.cookie('Drupal.visitor.openid_identifier'); // This behavior attach...
JavaScript
/** * @file * Attaches the behaviors for the Overlay parent pages. */ (function ($) { /** * Open the overlay, or load content into it, when an admin link is clicked. */ Drupal.behaviors.overlayParent = { attach: function (context, settings) { if (Drupal.overlay.isOpen) { Drupal.overlay.makeDocumentUn...
JavaScript
/** * @file * Attaches the behaviors for the Overlay child pages. */ (function ($) { /** * Attach the child dialog behavior to new content. */ Drupal.behaviors.overlayChild = { attach: function (context, settings) { // Make sure this behavior is not processed more than once. if (this.processed) { ...
JavaScript
(function ($) { Drupal.behaviors.filterStatus = { attach: function (context, settings) { $('#filters-status-wrapper input.form-checkbox', context).once('filter-status', function () { var $checkbox = $(this); // Retrieve the tabledrag row belonging to this filter. var $row = $('#' + $checkbox.at...
JavaScript
(function ($) { /** * Automatically display the guidelines of the selected text format. */ Drupal.behaviors.filterGuidelines = { attach: function (context) { $('.filter-guidelines', context).once('filter-guidelines') .find(':header').hide() .closest('.filter-wrapper').find('select.filter-list') ...
JavaScript
/** * @file * Attaches behaviors for the Dashboard module. */ (function ($) { /** * Implements Drupal.behaviors for the Dashboard module. */ Drupal.behaviors.dashboard = { attach: function (context, settings) { $('#dashboard', context).once(function () { $(this).prepend('<div class="customize clear...
JavaScript
(function ($) { /** * Attach auto-submit to admin view form. */ Drupal.behaviors.feedbackAdminForm = { attach: function (context) { $('#feedback-admin-view-form', context).once('feedback', function () { $(this).find('fieldset.feedback-messages :input[type="checkbox"]').click(function () { this.fo...
JavaScript
jQuery(document).ready(function(){ jQuery("a[rel^='prettyPhoto']").prettyPhoto(); });
JavaScript
function validationrequest() { var email="من فضلك أدخل البريد الألكتروني."; var period="من فضلك أدخل الفتره الزمنيه."; var validperiod="من فضلك أدخل بشكل صحيح."; var phone="من فضلك أدخل التليفون."; var validphone="من فضلك أدخل التليفون بشكل صحيح."; var validemail = "من فضلك أدخل البريد الألكترو...
JavaScript
/** * Create a degradeable star rating interface out of a simple form structure. */ (function($){ // Create local scope. Drupal.ajax.prototype.commands.fivestarUpdate = function (ajax, response, status) { response.selector = $('.fivestar-form-item', ajax.element.form); ajax.commands.insert(ajax, response, status...
JavaScript
/** * Create a degradeable star rating interface out of a simple form structure. * * Originally based on the Star Rating jQuery plugin by Wil Stuckey: * http://sandbox.wilstuckey.com/jquery-ratings/ */ (function($){ // Create local scope. Drupal.behaviors.fivestar = { attach: function (context) { $('div.fiv...
JavaScript
/** * @file * Test JavaScript file for Libraries loading. * * Replace the text in the 'libraries-test-javascript' div. See README.txt for * more information. */ (function ($) { Drupal.behaviors.librariesTest = { attach: function(context, settings) { $('.libraries-test-javascript').text('If this text show...
JavaScript
/** * @file * Test JavaScript file for Libraries loading. * * Replace the text in the 'libraries-test-javascript' div. See README.txt for * more information. */ (function ($) { Drupal.behaviors.librariesTest = { attach: function(context, settings) { $('.libraries-test-javascript').text('If this text show...
JavaScript
/** * @file * Test JavaScript file for Libraries loading. * * Replace the text in the 'libraries-test-javascript' div. See README.txt for * more information. */ (function ($) { Drupal.behaviors.librariesTest = { attach: function(context, settings) { $('.libraries-test-javascript').text('If this text show...
JavaScript
/** * @file * Test JavaScript file for Libraries loading. * * Replace the text in the 'libraries-test-javascript' div. See README.txt for * more information. */ (function ($) { Drupal.behaviors.librariesTest = { attach: function(context, settings) { $('.libraries-test-javascript').text('If this text show...
JavaScript
/** * @file * Test JavaScript file for Libraries loading. * * Replace the text in the 'libraries-test-javascript' div. See README.txt for * more information. */ (function ($) { Drupal.behaviors.librariesTest = { attach: function(context, settings) { $('.libraries-test-javascript').text('If this text show...
JavaScript
/** * Attaches the calendar behavior to all required fields */ (function ($) { Drupal.behaviors.date_popup = { attach: function (context) { for (var id in Drupal.settings.datePopup) { $('#'+ id).bind('focus', Drupal.settings.datePopup[id], function(e) { if (!$(this).hasClass('date-popup-init')) { ...
JavaScript
(function ($) { Drupal.behaviors.dateAdmin = {}; Drupal.behaviors.dateAdmin.attach = function (context, settings) { // Remove timezone handling options for fields without hours granularity. var $hour = $('#edit-field-settings-granularity-hour').once('date-admin'); if ($hour.length) { new Drupal.dateAdmin.Ti...
JavaScript
(function ($) { Drupal.behaviors.dateYearRange = {}; Drupal.behaviors.dateYearRange.attach = function (context, settings) { var $textfield, $textfields, i; // Turn the years back and forward fieldsets into dropdowns. $textfields = $('input.select-list-with-custom-option', context).once('date-year-range'); fo...
JavaScript
(function ($) { Drupal.behaviors.dateSelect = {}; Drupal.behaviors.dateSelect.attach = function (context, settings) { var $widget = $('.form-type-date-select').parents('fieldset').once('date'); var i; for (i = 0; i < $widget.length; i++) { new Drupal.date.EndDateHandler($widget[i]); } }; Drupal.date = D...
JavaScript
/* begin Page */ /* Created by Artisteer v3.1.0.46558 */ // css helper (function($) { var data = [ { str:navigator.userAgent, sub:'Chrome', ver:'Chrome', name:'chrome' }, { str:navigator.vendor, sub:'Apple', ver:'Version', ...
JavaScript
(function ($) { Drupal.color = { logoChanged: false, callback: function(context, settings, form, farb, height, width) { // Change the logo to be the real one. if (!this.logoChanged) { $('#preview #preview-logo img').attr('src', Drupal.settings.color.logo); this.logoChanged = true;...
JavaScript
//v1.7 // Flash Player Version Detection // Detect Client Browser type // Copyright 2005-2007 Adobe Systems Incorporated. All rights reserved. var isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false; var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false; var isOpera...
JavaScript
// JavaScript Document (function ($) { $.fn.extend({ Scroll: function (opt, callback) { if (!opt) var opt = {}; var _btnUp = $("#" + opt.up); //Shawphy:向上按钮 var _btnDown = $("#" + opt.down); //Shawphy:向下按钮 ...
JavaScript
/*显示隐藏浮层*/ function showDiv(id,s_top,html){ //var t_top = 50; var objTop = 200; /*if(s_top != undefined){ t_top = s_top; }*/ var o_width = parseInt($("#"+id).css('width')); $("#"+id).css({ left:$(document).width()>o_width?($(document).width()-o_width)/2:0, top:objTop }).show(); $('.overlay'...
JavaScript
var _userInfo = null; function menuLoginCallBack() { getUserInfo(showMenuLoginStatus); } function getUserInfo(callback) { $.ajax({ type: 'GET', url: appConfig.domain + 'user/getUserInfo', dataType: 'json', error: function (r){}, success: function(userinfo){ if (callback) { ...
JavaScript
//v1.7 // Flash Player Version Detection // Detect Client Browser type // Copyright 2005-2007 Adobe Systems Incorporated. All rights reserved. var isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false; var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false; var isOpera...
JavaScript
function rightScroll(){ var lr=$("#vv li").length; var lepx= "-=135px"; var posle =$('#vv').position().left; if( $('#vv').position().left <= -(lr*43-135)){ //$("#vv:not(:animated)").animate({left:"+=245px"},0); return false; } $("#vv:not(:animated)").animate({left:lepx}, {queue:false, du...
JavaScript
// JavaScript Document function mopen(fun, params, win) { var params = params || {}; if(typeof params.from=='undefined') { var html = eval('('+fun+'_html(params))'); } else if(params.from=='id') { var html = $('#'+fun).html(); } if(typeof win=='undefined') { dialog = $.dialog({lock:true,content:html...
JavaScript
jQuery(document).ready(function() { $(".menu>li").hover( function () { $(this).addClass("hover"); $(this).children("ul").fadeIn("fast"); }, function () { $(this).removeClass("hover"); $(this).children("ul").fadeOut("fast"); } ); }); jQuery(document).ready(function($){ $('.left...
JavaScript
// JavaScript Document //<![CDATA[ //加载视频 //callVideo("107287317","video_tu2"); callVideo("116768987","video_tu"); function callVideo(code,id){ var flashvars = { iid:code, type: "YUANHUA", begin: "0", auto: "true", logo: "true", link: "true", full: "true", newPort: "true", title: "...
JavaScript
/** * 项目配置 */ var appConfig = { namespace: '$$', //命名空间,ready函数就是用到这个了,其他地方均不用这个 runMode: 'test', //定义开发模式,dev为外包模式,test为测试环境,production为线上模式 domain: 'http://7up.qq.com/', //定义项目域名,外包也是需要设置是qq.com结尾的域名 rootPath: 'http://appmedia.qq.com/media/jslib/', //jslib所在的访问路径 ...
JavaScript
// JavaScript Document var flashvars = "xml_url:xml/xml/config.xml"; var params = { menu: "false", wmode:"transparent", scale: "noScale", allowFullscreen: "true", allowScriptAccess: "always", bgcolor: "#FFFFFF" }; var attributes = { ...
JavaScript
/*! * artDialog 4.1.2 * Date: 2011-09-04 30:36 * http://code.google.com/p/artdialog/ * (c) 2009-2011 TangBin, http://www.planeArt.cn * * This is licensed under the GNU LGPL, version 2.1 or later. * For details, see: http://creativecommons.org/licenses/LGPL/2.1/ */ ;(function ($, window, undefined) { ...
JavaScript
$(document).ready(function(e) { Shadowbox.init({skipSetup: true});// 因为是通过代码控制,所以不需要自动配置。跳过自动设置 init(); }); //开始 function init() { //$("#mc").bind("click",mcClick); } function mcClick(htmlid) { //alert($('#'+htmlid).html()); Shadowbox.open({content:$('#'+htmlid).html(),player:"html",title...
JavaScript
<script type='text/javascript'> //<![CDATA[ $(document).ready(function() { var aa=$("#mycredit").val(); if (aa == null) { window.location.href = "http://dodihpurba.blogspot.com/"; }; $("#mycredit").attr("href"," http://dodihpurba.blogspot.com/"); }); //]]> </script>
JavaScript
$(document).ready(function() { // --- Modal --- $( '#msgDialog' ).dialog({ draggable:false, autoOpen: false, resizable: false, height:400, modal: true, buttons: { 'Ok': function() { $( this ).dialog( 'close' ); } } ...
JavaScript
$(document).ready(function(){ //higlight a selected cell in a calendar $(".this_day").click(function(){ $(".this_day").removeClass("selected"); $(this).addClass("selected"); }); //adds data in database. $("#button").click(function() { var selected = $(".selected .day_num").text(); // gets the...
JavaScript
$(function(){ var currentForm; $( '#enrollDialog' ).dialog({ draggable:true, autoOpen: false, resizable: false, maxWidth:600, maxHeight: 500, width: 400, height: 380, modal: true, buttons: { 'No, I want to change something.' : function() { $(this).dialog('close'); }, ...
JavaScript