Posts by Zuul • 35,190 points
501 posts
-
5
votes3
answers3604
viewsA: How to make a background of an element in SVG in a decent way?
If Javascript / jQuery is an option You can ask the browser whether or not it supports SVG and by responding act accordingly: Example in Jsfiddle /** * Detecta suporte ao SVG */ function…
-
1
votes3
answers469
viewsA: jQuery . toggleClass() is not working as expected
As already referenced in other answers, jQuery .toggleClass() (English) is working, the problem is the CSS class has a lower priority than the settings given previously via #admin p. In short, when…
-
5
votes3
answers465
viewsA: Hide image generated by Javascript
One idea would be to include the script making use of the $.getScript() in order to include the sharethis plugin on the page. This way you can be aware and know when it was loaded, thus running the…
-
3
votes1
answer388
viewsA: JSON returning <html>
The Error received In a general way, the error Error parsing data org.json.JSONException ... refers to the inability to process JSON. For your particular case, it can be read in the error message:…
-
2
votes1
answer1456
views -
4
votes2
answers341
viewsA: Google Analytics code
The code you were given refers to the new Universal Analytics currently in Beta Public and without support for the dc.js which only comes to be supported in the third stage (English) of the…
-
5
votes3
answers236
viewsA: Check if a div contains a number
You already have some very good answers, I’m just going to suggest a force to create a collection of objects based on the intended verification, to streamline your practical scenario: Example in…
-
4
votes3
answers2440
views -
2
votes2
answers1081
viewsA: Dynamic checkbox validation with jquery-Validator
The only solution I can think of is for you to control the existence of this dynamic field in submitHandler and act accordingly: Example in Jsfiddle $('#form_novo').validate({ rules: { 'bnd[]': {…
-
4
votes4
answers224
viewsA: Given a group of options, at least one should be selected, using jQuery
I would use a simpler method to leave nothing unselected: Example in Jsfiddle $('form').on("click", '.check-group', function (e) { return ($("form input:checkbox:checked").length >= 1); }); Note:…
-
1
votes1
answer153
viewsA: The Greensock hotel fires all animations instead of just one
You do not have your Mac present in the question, which makes it difficult to illustrate the solution. Similarly you make use of the plus but without instantiating the same anywhere in the code that…
-
4
votes2
answers653
viewsA: jQuery resizing animation
Answer Your current problem is that the action is only appended to the element(s) if a certain condition is met, in this case, the screen width greater than 800 pixels. In addition, the way you…
-
2
votes2
answers1120
viewsA: INNER JOIN does not return database result
Updating After discussion in the comments of this reply, it is clear that your query is not returning results as by inserting the records into the database you are not applying to the field…
-
10
votes2
answers761
viewsA: How to create and remove aliases in GIT
You can add them to your own ~/.gitconfig: [alias] st = status ci = commit -v Or you can make use of the command alias git config: $ git config --global alias.st status $ git config --global…
-
1
votes2
answers1722
viewsA: Column size on a Gridview on Android
Since you are indicating the number of columns, you can make use of android:stretchMode to indicate that you want all columns to have the same width depending on the space: Defines how Columns…
-
8
votes3
answers18362
viewsA: How to preview a loaded image in an "file" input?
Making use of the API Filereader (English), you can read the address on input of the kind file and collect the binary data and then inject it into the page: Function In the function below, we are…
-
14
votes3
answers1952
viewsA: How to remove a website from Google?
Depending on the current indexing, two steps are needed to ensure that the site will not be re-indexed and ensure that it will not appear in Google search results with error 404: Disable indexing To…
-
10
votes3
answers2494
viewsA: Table css type excel
Which seems necessary, even though you don’t have yours Markup in your question, is to format the input to remove some of its settings so that it is occupying the entire table cell: Example working…
-
3
votes4
answers5487
viewsA: Problems with installing Android Studio on Fedora Linux
For a full assessment of your problem, here are a few things you need to check to make sure you have what it takes: Instructions for Fedora Linux Check if you have the package jdk installed: rpm -qa…
-
1
votes4
answers6021
viewsA: Exchange text by clicking on it to display/hide an element
In case you want to keep the anonymity of the element that received the click, you can pass it inside the function blocking, and then check and update the text accordingly: Example working on…
-
3
votes1
answer231
viewsA: Create a scrollable tabs with javascript
If jQuery is a solution, there is a plugin for jQuery-UI that allows you to add this functionality to the Tabs. jQuery-ui Scrollable tabs plugin v1.0 Works in: Firefox 3.6+ Internet Explorer 7+…
-
7
votes3
answers8971
viewsA: Go to the next element with next and add a class to the previous one
If your problem is in the code in jQuery, you should have the same question! Problem with HTML You have an HTML problem, the id of your element that surrounds the various lists contains the…
-
4
votes3
answers1343
viewsQ: Empty multiple tables in a single run
Via PDO, can do the TRUNCATE (English) of a table as follows: // Matriz de definições $dbcon_new = array( "host" => "localhost", "dbname" => "bubu", "username" => "super_dragon", "password"…
-
1
votes1
answer373
views -
4
votes2
answers1602
viewsA: Display "longblob" field content containing PDF file
The document stored in the database will have to be collected in an isolated PHP file, so that it contains the appropriate headers for the correct interpretation of the data. A solution will be to…
-
9
votes3
answers54
viewsA: Remove margin with jquery
It seems to me that you are setting the target of the action to be taken by jQuery in the wrong way. In your CSS you have: .three-columns .content { ... } .content { ... } To hit the same element…
-
15
votes2
answers10588
viewsA: Send image by selecting it and show thumbnail without refreshing the page
In order to upload an image to the server and after sending successfully present it, you need to make use of Ajax and preferably a plugin that already takes care of all the work of interacting with…
-
5
votes3
answers856
viewsA: Query search for value in Database
In your question, you are indicating that the difficulty is in the operation of inserting new lines in the database. After that, you have a query to collect results and you indicate that the query…
-
7
votes1
answer557
viewsQ: Limit payment options to Paypal accounts only (credit card not)
I’m doing the Paypal Express Checkout API integration. When the paying customer actually goes to the Paypal website to enter his or her details in order to make the payment, you are presented with…
-
12
votes4
answers6633
viewsA: How to make the browser "Back" button work on an AJAX site?
Introducing In order for the "Back" and "Forward" buttons that browsers provide to be used on a web-site whose contents are loaded asynchronously, it is necessary to manipulate the browser’s own…
-
16
votes3
answers63205
viewsA: Image with 100% width
An alternative to browsers modern is to set the size of the image being applied as the background of an element by making use of the CSS property background-size (English). Works from the following…
-
56
votes7
answers12436
viewsA: Use semicolon or not at the end of the lines in Javascript?
Always use the ; and this is why: Javascript is a language that makes declarations to the browser. The character used to separate these statements is ; and it must always be used. The code can work…
-
6
votes2
answers1089
viewsA: Is there a Parallax Mousemove effect for jQuery?
Parallax In Portuguese it can be written "Parallax". Parallax comes from the Greek: παραλλαγή meaning change. It is the change of the angular position of two stationary points relative to each other…
-
1
votes1
answer477
viewsA: DOM update via jQuery Mobile
The code you presented in the question is perfectly valid and works as expected. Example working on Jsfiddle Considerations to take when performing this type of operations on Ids: ID is unique: How…
-
13
votes9
answers9696
viewsA: Is it right to use the <i> tag for icons and not italics?
Introducing The first time I realized the use of tag <i></i> to apply icons, more properly those contained in a font (font), was through Bootstrap. Some examples are the Fontawesome and…
-
8
votes6
answers1639
viewsQ: Remove an undetermined number of " " in a column in the database
The field description on the table product contains HTML generated by Ckeditor (English) that tries to escape the content: <table…
-
4
votes1
answer523
viewsQ: Apply CSS property "content" without resorting to style sheet
I have a web-site that is available in several languages, and not having to redo the whole structure of an image slider, there is a small text that is currently being applied through the selector…
-
29
votes6
answers66760
viewsQ: "foreach" in Javascript
By way of example, in PHP we have the function foreach() (English) which allows us to execute a certain code for each element found in a matrix: <?php $arr = array(1, 2, 3, 4, 5, 6); foreach…
-
5
votes2
answers353
viewsQ: Remove matrix input by its value
To remove an input from an array, we can use the function unset(): <?php $arr = array(1, 2); unset($arr[0]); var_dump($arr); /* Resultado: array(1) { [1]=> int(2) } */ ?> Question How…
-
8
votes1
answer3210
viewsQ: Maximum number and size of cookies
When investigating about cookies and their limitations, I came across this Microsoft page where they talk about Internet Explorer and its capabilities regarding Cookies: Size and number limits of a…
-
9
votes1
answer774
viewsQ: Rewrite URL for "root" accesses but do not block access to sub-domains
I have the following code that rewrites the entered URL to correctly identify the areas, sub-areas and content ID the visitor is trying to access: # Rewrite the url <IfModule mod_rewrite.c>…
-
24
votes4
answers7004
viewsQ: Create a triangle with CSS
Squares that have the color of an item can have up to two colors that in the latter case should be displayed as shown below: Both colors are applied to the CSS property background. What is being…
-
6
votes1
answer360
viewsA: Problem with types in function parameter
According to the documentation: Hinttype s can’t be used with scalar types such as int or string. Resources and Traits are not allowed either. Simply put, you cannot force the parameter to the type…
-
9
votes2
answers6568
viewsQ: "placeholder" of "textarea" does not appear
I have a textarea with a placeholder which according to the documentation (English) is perfectly valid and should work: Example in Jsfiddle Part of the form <?php /* Apenas o código referente à…
-
27
votes6
answers23686
viewsQ: Difference between absolute and relative Urls in page contents
The contents of the page can be requested by entering a complete URL, relative or relative to the root of the location where our base file is located (generally the index.php or index.html):…
-
25
votes3
answers6810
viewsQ: Difference between PATH_SEPARATOR and DIRECTORY_SEPARATOR
The documentation on this is rather vague, the little that exists does not clearly clarify the difference between the use and purpose of the following two PHP constants: PATH_SEPARATOR and…
-
7
votes1
answer4013
viewsA: Problems with the Phonegap
Your mistake: Error: Please install Android target 19 (the Android Newest SDK). Make sure you have the Latest Android tools installed as well. Run "android" from your command-line to install/update…
apache-cordovaanswered Zuul 35,190 -
13
votes5
answers704
viewsA: Event is not tied to the element
Problem By the time your code is being read, your element does not exist on the page, so the attachment of the click never occurs. Solution As an alternative to what has already been suggested, if…
-
5
votes2
answers2614
viewsA: How to get the index creation date in SQL Server?
For the documentation of Microsoft SQL Server - sys.Indexes (English), there is no field that stores the creation date of Index. A survey (English) on the Microsoft SQL Server website itself reveals…
-
7
votes1
answer98
viewsQ: Use ":last-Child:after" in Internet Explorer 8
I have a graph where some elements are generated via CSS, namely the trace below the quantity scale: CSS Used: #results .chart-scale li{ font-size:16px; line-height:18px; padding-top:38px;…