I have three different types of checkboxes and I am disturbing to toggle them, but all the checkboxes Toggling I just want to toggle the selected element.
My code is as follows: CSS ==== Oter-box {background: none repeat scroll 0 0 # ea5700; Padding: 1px; Width: 55px; Height: 23px; Box-Shadow: 2px 1px 2px # 888888; } .poly-box {Infection: All .2s ease-in-out; Background: Any repeatable scrolls 0 0 # DDDDDD; Width: 15px; Height: 20px; Margin-right: -2px; Margin-left: 0 pixels; Display area; Correct: -32 pixels; Padding: 4px 5px 3px 3px; Status: Relative; Border: None; Border-radius: 2px; Box-Shadow: 2px 2px 2px # 888888; } # Right box Winner-box {LEFT: 37px; Top: 0; } .txt {padding: 2px; / * Font-family: 'robot slab', serif; * / Font-weight: bold; font size:; White color; } # Right box .txt {float: left; } #left-box Winner-box {top: 0; Left: 0 pixels; } #left box .txt {float: right; } JS === $ (function () ($ ('. $' External box '$' ('.txt'). $ ('.txt'). CSS ('color', 'gray'); $ ('. External-CSS ('background', '# e2e2e2');} and if (value === 'left-box'); $ ('. External box' ('.') ($ '.txt'). $ '('. '); $ (' Color ',' white '); $ (' external box '). Attr (' Id ',' right-box '); $ (' Css ('background', '# ea5700');}}); Here is my html code in which I created three div elements
html ==== div class =" txt " Style = "display: inline;" & gt; yes & lt; / div & gt; & lt; div class = "inner-box" & gt; & lt; / div & gt; & lt; div / div & gt; ; Div class = "external-box" id = "right-box">
Here if I am transferring all instead of selecting any checkbox, I want to toggle the current object which is clicked I have also used the 'this' keyword. But in vain
To target .txt elements with proper reference Required: Click $ (' External box ') (function () {var value = this.id, $ txt = $ (this) .find (' .txt '); if ( Value === 'right bock C ') {$ txt.text (' NO '). CSS (' color ',' gray '), $ (this) .attr (' id ',' left-box '); $ (this). 'Background', '# E2A2E2');} and if (value === 'left box') {$ txt.text ('yes'). CSS ('color', 'white'); $ (This) .attr ('id', 'right-box'); $ (this) .css ('background', '# ea5700');}}); Click the related .txt element within the handler, only $ (this) .find ('.txt') and is currently clicked .auer- Box with $ (this) . Also keep in mind that you have repeated the ID in HTML, for example instead of using classes it should be corrected instead.
Demo:
Popular posts from this blog
After the function in C, for the system (), it affects the hardware counters, so how do you order that The example displayed for the example you are trying to view lets the IM use the display API (PAPI) and the program is a precompiled matrix multiplication application. PAPI_start_counters (); System ("./matmul"); PAPI_read_counters (); // Print the values PAPI_stop_counters (); I'm clearly missing a bit, but I'm trying to figure out what it is possible to say, counter receiving a program im running Is through use. With my tests I will get wild numbers like below, they are clearly wrong, just want to find out why total bicycle =========== 140733358872510 instructions complete =========== 4203968 Floating Point Instructions =========== Floating Point Operations =========== 4,196,867 Weight ======= ==== 140733358872804 store ======= ==== 4204037 branches taken =========== 15774436 System () Normally it is a very slow function, on Linux, it is ...
I have a little code here. Could you please tell me what this code really does? please. Here in the AJAX call: $ .ajax ({url: "{% url} upload_document '%}", type: "POST", data : {Csrfmiddletoken: document.getElementsByName ('csrfmiddletoken') [0] Price, Title: document.getElementById ('title'). Value, // document: document: document.getElementById ('document'),}, datatype: "Jason", success: function (feedback) {if (feedback == "true") {// success} other {// attachment errors}}}); How AJAX works in the Django and how we can see the AJAX request. Here is the idea of my thoughts def upload_document (requested): Print request. POTT print request FILES if request.is_ajax (): If request.method == 'POST': form = UploadForm (request.POST, request.FILES, user = request.user) if form.is_valid (): Form.save () return HTTPPCS (SimpleJason Dumps ('True'), Mime Type = 'App / Jason') Other:...
I have an e-mail application that shows content in a UIWebView Code> UISplitViewController . As long as I do not already zoom in / out the device, until everything goes well in UIWebView . When rotating the device, I adjust the frame of UIWebView in - (zero) Will AnimatorationInterface Orientation: (Interface Orientation) from Interface Orientation: (NSTInInvail) Period The problem is, when I zoomed in / out in UIWebView and then rotate the device. The material has not been changed to a new frame, which leads to a gray / black border in the material, or the content can be horizontally scrolled. Addional information: UIWebView is a subview on a UIScrollView which can be scrolled when UIWebView is fully visible scrollEnabled is UIScrollView disabled and can be scrolled by UIWebView . When selecting a code above the picture UIWebView Shows. It is the state before roaming in both cases. [zoomed in before rotation Has been on top of the pictur...
Comments
Post a Comment