Category: jQuery
-
Post Views: 10 The implementation code is as follows: // uncheck the sorted line $(#checkout).live(Click, function(e){ if(!$(e.target).parent().hasClass(goods_row) ){ $(#checkout tr).removeClass(select-tr); } }); // sort, select the object to be moved $(#checkout .goods_row).live(Click, function(e){ if(!$(e.target).hasClass(goods_row) && !$(e.target).hasClass(goods_number) ){ var self = $(this); if(self.attr(merge_check) {//Set sales $(#checkout tr).not($(.+self.attr(merge_check))…RemoveClass(select-tr); $(.+self.attr(merge_check)).ToggleClass(select-tr); }Else {//Single product sales $(#checkout tr).not(self).removeClass(select-tr); self.toggleclass(select-tr); } } }); // exchange order…
-
Post Views: 14 The most initial code: $this->widget(zii.widgets.jui.cjuidatepicker, array( name=>mendtime, value=>date(Y-M-D, time()), Language=>yii::app()->getLanguage(), options=>array( showanim=>slidedown, changeyear=>true, changemonth=>true, showweek=>true, autosize=>true, dateformat=>YY-MM-DD, maxdate=>0, Mindate=>-10d, , HtmlOptions=>array( readonly=>readonly, class=>txt, Style=>width:200px ) )); Post-realization: Implementation process: 1. Extension download on the official website of yii:http://www.yiiframework.com/extension/datetimepicker/ 2. Copy the cjuidateTimePicker folder to the protected\extensions directory; 3. tohttps://github.com/trentrichardson/jQuery-Timepicker-Addon下载语言包,因为yii扩展中没有语言包; 4. Look in the file CJUIDateTimePicker.php: $CS->RegisterScriptFile($assets.self::assets_name..js,cclientScript::pos_end); add…
-
Post Views: 14 Since it is necessary to determine whether a value exists in this PHP array in JavaScript, you need to pass this PHP array into JavaScript! This effect can be achieved by using JSON-encoded variables using JSON_ENCODE – JSON encoded! Finally, use $.inArray(item.gid, js_goods_ids) == -1 to determine whether the value of this js variable exists in…
-
Post Views: 10 HTML structure: <td><span id=”is_mar431″><input class=”is_mar” value=”0″ id=”is_mar431_0″ checked=”checked” type=”radio” name=”is_mar431″ /> <label for=”is_mar431_0″>no</label> <input class=”is_mar” value=”1″ id=”is_mar431_1″ type=”radio” name=”is_mar431″ /> <label for=”is_mar431_1″> is </label></span></td> JS structure (front): // Whether it is damaged, select Yes, enter the text box of the damage information $(“span[id^=is_mar]:radio”).change( function() { var this_name = $(this).attr(“name”); var input_id =mar_note_+this_name.substring(6); if…
-
Post Views: 8 The current demand is to judge whether the number of changes in the exchanged goods is all 0. If all are 0, a prompt box needs to be popped up and submitted! javascript: // Iterate the number of changes in the product, if all are 0, it will not be submitted var sub = 0; $(“.goods_number”).each(function…
-
Post Views: 7 Now you need to extend the DatePicker, in: https://github.com/trentrichardson/jQuery-Timepicker-AddonThere are plugins that support this extension; The effect is as follows: Now the default is the English interface, the extended function needs to be set to Chinese, and the language setting file needs to be inserted: The result is as follows:
-
Post Views: 11 HTML code: <section> <ul> <li> <a href=”#”><img src=”http://www.lassaquarium.com/tpl/lassaquarium/images/product/product-category/1.jpg”width=”230″ height=”170″ alt=”starfish aquarium”></a> <a href=”#”>Starfish Aquarium</a> </li> <li> <a href=”#”><img src=”http://www.lassaquarium.com/tpl/lassaquarium/images/product/product-category/2.jpg” width=”150″ height=”170″ alt=”filter”></a> <a href=”#”>Filtering device</a> </li> <li> <a href=”#”><img src=”http://www.lassaquarium.com/tpl/lassaquarium/images/product/product-category/3.jpg” width=”150″ height=”170″ alt=”submersible pump/head”></a> <a href=”#”> Submersible pump/head</a> </li> <li> <a href=”#”><img src=”http://www.lassaquarium.com/tpl/lassaquarium/images/product/product-category/4.jpg” width=”170″ height=”170″ alt=”illumination device”></a> <a href=”#”>Lighting device</a> </li> <li> <a href=”#”><img src=”http://www.lassaquarium.com/tpl/lassaquarium/images/product/product-category/5.jpg” width=”150″ height=”170″…
-
Post Views: 9 By searching on the official website, it is determined that the reason is that the installation and activationjQuery updateModule, so this error occurred, I had to disable it recently, and it turned out to be normal all of a sudden.